Populate InfoPath Combo Box
- by fwm
I am trying to populate a drop down and found this page, which provides part of the solution:
http://www.bizsupportonline.net/infopath2007/programmatically-fill-populate-drop-down-list-box-infopath-2007.htm
I got this to work, but if players.xml was changed, the drop down list didn't reflect it. I had to rename the file and add the new file as my secondary data source to see the change. For my purposes, the xml file that is used to populate the drop down box would need to be created anew. Each time the form is loaded, I programatically create a new xml file, but the drop down doesn't pick up the new file, even though I have named it as the secondary data source. It seems that once you set a file to be your secondary data source, it takes a snapshot of that file at the time the source was added as a secondary data source and if you change the file, you must rename and add it as your secondary source. How do I populate a drop down box from an XML file such that if the XML file changes, the contents of the drop down change accordingly?