Copy link to clipboard
Copied
While I can easily enough populate a drop down list by creating a script using the setItems method to assign the values of an array to populate the items in a drop down list, is there a also property or method I can use to add/populate the export values for each and every item as well from inside my script?
Copy link to clipboard
Copied
Resolved. Fortunately, I found an answer posted by Try67 back in January 2022. The solution is based on using a 2-dimensional array. Whoever would have thought? Though somewhat intuitive, I never would have guessed that creating a 2-dimensional aray with a 2nd element assigns an export value to each item in a drop down list. And here I always believed that the setItems method was solely intended to access/asign items to the drop down list. My final question was where in the tutorials provided by Adobe such as the Adobe Acrobat Javascript reference can this information be found? Under the setItems () method, I guess I should have read the fine print displayed to the right of the oarray parameter. Duh?
Copy link to clipboard
Copied
Resolved. Fortunately, I found an answer posted by Try67 back in January 2022. The solution is based on using a 2-dimensional array. Whoever would have thought? Though somewhat intuitive, I never would have guessed that creating a 2-dimensional aray with a 2nd element assigns an export value to each item in a drop down list. And here I always believed that the setItems method was solely intended to access/asign items to the drop down list. My final question was where in the tutorials provided by Adobe such as the Adobe Acrobat Javascript reference can this information be found? Under the setItems () method, I guess I should have read the fine print displayed to the right of the oarray parameter. Duh?
Copy link to clipboard
Copied
Yes, it's described in the documentation of this method (highlighted below), and in the two last examples given there:

