How to use the same drop-down list values for different fields? - InfoPath Dev
in

InfoPath Dev

How to use the same drop-down list values for different fields?

Last post 09-21-2010 05:57 AM by Jimmy. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 09-20-2010 02:27 PM

    How to use the same drop-down list values for different fields?

    I have an employee leave form that allows the Initiator to select from 11 different leave types.

    Later in the forms workflow, the supervisor also selects a leave type, which may be different than the initiators.

    Finally Payroll updates the final section of the form with what leave type is being applied, which may again be different than either the initiator or supervisor.

    These three data fields must maintain their own values for auditing purposes.

     I would like to use a static list for all three drop-down list boxes.  I do not want to store this list in SharePoint, since the form gets routed to multiple sections (read sites).  The only solution that I can think of is to retype the 11 leave types into all 3 drop-down list box properties windows.  Is there an alternate solution?  I'd love to do an xml solution, but I don't know how.

     

     

    Greg W Appelt
  • 09-20-2010 06:12 PM In reply to

    Re: How to use the same drop-down list values for different fields?

    You can store your list of values in a secondary data source.  Just use a text editor or something to make an XML structure like this:

     <leaveTypes>
        <type>Illness</type>
        <type>Vacation</type>
        <type>National Holiday</type>
    </leaveTypes>

     Then save this in a file with an .xml extension, and use the data connection wizard to add this as a data connection.  Remember to leave the "Query on open" checkbox checked.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 09-21-2010 04:55 AM In reply to

    Re: How to use the same drop-down list values for different fields?

    Jimmy,

    That is just way too simple!  Thanks for the 100% correct answer. It took me a total of 2 minutes to create the file, add it as a data source, and direct my drop-downs to it for their values.  I even took the extra 15 seconds to set up a rule on the first drop-down to set the default value of the second drop-down to the value in the first drop-down.  Amazing (non-code) stuff!

     

    Greg W Appelt
  • 09-21-2010 05:57 AM In reply to

    Re: How to use the same drop-down list values for different fields?

    Glad to help! :-)

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.