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
kookie - 26 Feb 2007 20:40 GMT
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.
> 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
[quoted text clipped - 8 lines]
>
> Thanx