locked
InfoPath 2007 drop down from XML file RRS feed

  • Question

  • I have added my xml file to the data source of the InfoPath form, but when I run it the drop down is blank.  I have added the namespace and added it to the repeater with the drop down.  Any ideas? TIA!

     

    Thursday, September 29, 2011 3:48 PM

Answers

  • Hi David,

    I don't fully understand from your question what your method was.  However, how I would use an xml file to populate the dropdown is as follows:

    • Add the xml file as a secondary datasource to the form
    • Add a dropdown to my form / main datasource
    • Open the properties of the dropdown control (right click the control > drop-down list box properties)
    • Select "Get Choices from an external data source"
    • Choose your xml file in the data source drop down
    • In the entries box, click the button to select the xpath to the right of this box
    • Expand the nodes and select the node that contains the data you wish to populate the drop down with

    I hope that helps,

    Melissa

    • Proposed as answer by Guangming Wednesday, October 5, 2011 3:27 PM
    • Marked as answer by star.warsModerator Thursday, October 6, 2011 6:39 AM
    Thursday, September 29, 2011 7:09 PM

All replies

  • Hi David,

    I don't fully understand from your question what your method was.  However, how I would use an xml file to populate the dropdown is as follows:

    • Add the xml file as a secondary datasource to the form
    • Add a dropdown to my form / main datasource
    • Open the properties of the dropdown control (right click the control > drop-down list box properties)
    • Select "Get Choices from an external data source"
    • Choose your xml file in the data source drop down
    • In the entries box, click the button to select the xpath to the right of this box
    • Expand the nodes and select the node that contains the data you wish to populate the drop down with

    I hope that helps,

    Melissa

    • Proposed as answer by Guangming Wednesday, October 5, 2011 3:27 PM
    • Marked as answer by star.warsModerator Thursday, October 6, 2011 6:39 AM
    Thursday, September 29, 2011 7:09 PM
  • I got the drop downs to use the XML file. I selected External data source and then clicked on Resource to select the XML file.  That works!

    David

    Tuesday, October 4, 2011 2:30 PM