Reference to n element of a list :(

P

Paul

Please help me.

I have an external data source which is a list of ID's, I need a
reference to n element of that list. This is a XPath expression, it
works.

xdXDocument:GetDOM("name_od_datasource")/dfs:myFields/dfs:dataFields/dfs:name_od_datasource[n]/@S_ID

where n is the n element of a list.

That's great but how can I write something like that directly in Visual
Basic? Could you help me?

Simply I need a reference (from VB, not XPath) to n element of my list
(external data source). I tried for example, create a drop down list.
That drop down list is filling up by those elements but I still can't
get the n element of that drop down list (only the first one). I
suspect there is a direct method (without a drop down list) to get to n
element od external data source. I tried various methods but nothing
helped :(

I would be greatful if you could help me.
 
A

andrew_s

I think you may be looking for something like this?

http://infopathdev.com/forums/topic.asp?TOPIC_ID=96

Dim myNode As IXMLDOMNode =
thisXDocument.DOM.selectSingleNode("/dfs:myFields/dfs:dataFields/s0:SelectHardwareSoftwareRequestByIDResponse/s0:SelectHardwareSoftwareRequestByIDResult/ns1:DataSet1/ns1:dbo_udp_SelectHardwareSoftwareRequestByID/ns1:HardwareOrSoftware")

You would still be using XPath, though it would be within vb.net.

cheers,
Andrew
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top