Creating multiple drop down lists from data in an excel file?
Hello, I am relatively new to using the javascript editor in Adobe.
I want to create an editable pdf form with 3 drop down lists from data I have in an excel file. The excel file has multiple columns, but I only want to read three columns, columns B (ID), D (company) and E (sector). All entries in column B are unique, but entries in columns D and E can be duplicates. For example, the value in drop down 1 will be company, the value in drop down 2 will be sector and the value in drop down 3 will be ID.
- I want drop down 1 to display all entries in column D, companies, without displaying duplicates.
- Based on the selection made in drop down 1, assuming 'company A', I want drop down 2 to display entries in column E that are on the same row with the value selected in drop down 1; i.e. I want drop down 2 to display all sectors in 'company A'.
- Lastly, based on the values selected in drop down 1 and 2, 'company A' and 'sector B', I want drop down 3 to display entries in column B that have the selected values of drop down 1 and 2 on the same row; i.e. I want drop down 3 to display all IDs in 'sector B' of 'company A'.
All this data is stored in an excel file that has a lot of entries and is updated weekly. The way I am currently thinking of doing this is to hard code all the information in the 'custom validation scripts' of drop down 1 and 2, so that the selection in 1 controls the options displayed in 2, and the selection in 2 controls the options displayed in 3. The main issue I have with this is that there are too many entries, which will make it too time consuming, and the fact that the file is constantly update, means I would have to keep editing the validation scripts.
I want to know if it is possible to have the pdf form call/access/load the excel file, and have a javascript code sort through the file data and dynamically populate the drop down boxes when selections are made. If you have any idea if this is possible or if it is not, please let me know. Any help will be much appreciated.
