Expand my Community achievements bar.

Populate a drop down list with data from Excel and fill in a text field, based on drop down selectio

Avatar

Level 1

Hi!

I have a problem with a PDF form: There's a drop down list that I populate with Excel data that I've put in an XML file through an XSD file -- no problem here. The drop down list has a data binding to the XML file, so that a choice in the drop down list can be associated with an object in the XML file. So, when I make a choice in the drop down list, a corresponding object value is fetched from the XML file and put in a text field on the form.

How to do this is described by Stefan Cameron here:

http://forms.stefcameron.com/2006/07/29/dynamic-properties/

There's a snag, though, and to describe it more clearly:

The XML file contains three types of objects: role, role number, and role cost center. Of these I use the first and the third, i.e. the role and the role cost center. The drop down list contains the roles, and when I select a role, the corresponding cost center is filled out in the text field. So far, so good!

But -- if the cost center has the same value for two or more roles, all of these roles "bounce back" into the drop down list, that is, they are all selected in the drop down list. How many of these you can see depend on the height of the drop down list -- if it's low you'll only see the first one.

If I modify Stefan Cameron's data in his example I get the same behavior, so the problem seems to have to do with how XML data are fetched.

I'm sure there's a workaround, but I can't find it! I've spent many hours browsing the web without finding anyone with a similar problem.

Any suggestions appreciated!

1 Reply

Avatar

Level 2

Although your issue is far beyond mine, I was hoping you can help me out.....

I need to create a drop down list of names which I wish to somehow link to an Excel spreadsheet.

Please let me know the steps I need to do.  I've tried several things, but nothing seems to work and I'm not sure what I am doing wrong.

Thank you