How to populate a Multi-Select list box in Code - InfoPath Dev
in

InfoPath Dev

How to populate a Multi-Select list box in Code

Last post 02-16-2012 05:11 AM by RonInOttawa. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 02-16-2012 05:11 AM

    How to populate a Multi-Select list box in Code

    Hello;

    I have a form that users typically fill out manually to request exceptions to our processes. However, because of the results of a SOX audit, we need to fill out a copy form for each and every employee to document document grandfathered exceptions. I'm getting all of the information to fill out the form from our HR Database and Some from ActiveDirectory.

    One of the fields on the form is a Multi-Select list box that shows the type of Remote Access a user is requesting. Since we're backtraking here, I know what they have from the LDAP query, so I need to populate one to four of the 4 items in the Multi-Select list box. I can do 1 and only 1 - Doesn't matter what the value is it puts the check in the right place.

    If I do something like the following...

    If Citrix Then 

    Nav.SelectSingleNode("/my:FunctionalTemplate/my:VarianceDetail/my:Remote/my:RemoteAccessTypes", ns).SetValue("CITRIX")

    End IfIf MailX Then   

    Nav.SelectSingleNode("/my:FunctionalTemplate/my:VarianceDetail/my:Remote/my:RemoteAccessTypes/my:RemoteAccessType", ns).SetValue("MailX")

    End IfIf VPN Then   

    Nav.SelectSingleNode("/my:FunctionalTemplate/my:VarianceDetail/my:Remote/my:RemoteAccessTypes/my:RemoteAccessType", ns).SetValue("VPN")

    End IfIf RDP Then   

    Nav.SelectSingleNode("/my:FunctionalTemplate/my:VarianceDetail/my:Remote/my:RemoteAccessTypes/my:RemoteAccessType", ns).SetValue("RDP")

    End If

    Then I get an "Schema validation found non-data type errors." error because the second, third or fourth elements don't exist.

    Any ideas on how I can select the various items on the Multi-Select List Box?

    Thanks for all help/suggestions in advance.

    Ron...

    Cheers.
    Ron...
Page 1 of 1 (1 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.