Infopathh Multi-Selection List Box

C

chris geier

Greetings,

I have an IP form using a dataconnection to populate a Multi-selection
listbox with options. Then when finished filling out the form they submit
the form to a webservice where we parse the XML. However the values IP
stores for this list box is something like

Value1, Value2 etc.

But we need the actuall values that were selected from the datasource. I
have seen a few articles on how to do this but have not been able to get
them to work. I believe because of the fact that the options are being
populated by another dataconnection.

Ideas?
 
S

S.Y.M. Wong-A-Ton

What do you mean with "actual values"? What you are currently getting are the
actual values. :) Or do you mean the display names? And how are you
submitting to the web service? Through code? And which articles did you read?
 
S

S.Y.M. Wong-A-Ton

Sorry, Chris. Things get hectic sometimes and I'm not able to respond as
quickly as I would like to.

I had a quick look at the links. What you need to do is retrieve the value
of the multi select list box. This will contain the selected values separated
by commas. Use the Split() function to split those values up and put them
into an array (one of the articles show how to do this). Once you've done
this, you can loop through the array. For each item, you must them do a
lookup in the secondary data source that is bound to the multi-select list
box and use the value of the item to retrieve its display name. You can
retrieve the secondary data source using
DataSources[<sec_ds_name>].CreateNavigator() and then use a SelectSingleNode
with an XPath expression that contains a filter on the value to find the
display name.
 

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