how do I concat everything checked in a multiple selection list box?

H

hbnc99

Hello and Happy New Year to all.

One of my forms populates key words within the text of another
letter-like form.
I need to take all selections in a multiple selection list box and have
them display in another text box as a list separated by commas
concatted to a boilerplate phrase.

When I concat this control with the phrase, all that's picked up is the
first box checked and no more.

Thanks for any and all help with this. I'm new to Infopath, so please
keep it as simple as you can for me.

Mike
 
M

Marcel

Happy New Year to you also,

I place a button and a multiple list box (name mlb) on a empty form. Added
some jscript code:

function CTRL5_5::OnClick(eventObj) {
var multipleListBoxField = XDocument.DOM.selectSingleNode("//my:mlb");
var groupField =
XDocument.DOM.selectNodes("/my:myFields/my:group1/my:mlb");
for (i=0; i< groupField.length; i++) {
//Obtain the item. var item = groupField.item(i);
XDocument.UI.Alert(item.text); // here change to do with the values
what ever you want..
}
}

You now can access all the values selected in the multiple list box and do
with it whatever you want..

Regards,

Marcel
 
M

mptrauber

Thanks much, but I'm probably a year away from the proficiency level
that would allow me to take advantage of your kind advice.

I apologize, but I still need instruction on the "open this, click
that" level.

Thanks
 

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