text field equals multiple selections in list box

K

kookie

I am trying to make a text field equal the multiple selections made in the
list box. I have it updating on After Change. But each new selection deletes
the previous one.

How can I get it to capture all selected items from the list box. once items
are Captured how can I separate them, something similar to

objVar.join(",");

I am using Jscript.

Thanx
 
K

kookie

Jscript Solution:

function msoxd_my_AssignedTo::OnAfterChange(eventObj)
{
// Write code here to restore the global state.

if (eventObj.IsUndoRedo)
{
// An undo or redo operation has occurred and the DOM is read-only.
return;
}

// A field change has occurred and the DOM is writable. Write code here to
respond to the changes.

if(eventObj.Operation == "Insert")
{
var strRecip =
XDocument.DOM.selectSingleNode("/my:myFields/my:rgRecipients");

if(strRecip.text == "")
{
strRecip.text = eventObj.Site.text;
}
else
{
strRecip.text = strRecip.text + ", " + eventObj.Site.text;
}
strRecip = null;
}


}


The only issue I have is that with the InfoPath 03 you cant display all
clicked items in the drop down. i had to add a textbox "rgRecipients" to
insert items in.
 

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