Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / February 2007

Tip: Looking for answers? Try searching our database.

text field equals multiple selections in list box

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
kookie - 21 Feb 2007 18:37 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.