Skip to main content
Participant
Jun 2, 2025 1:47 PM UTC
Question

Help with drop down export

 I have a list of names in a drop down. I have set the options to export an ID number specific to a name. I created text field 1 that auto fills per that export value. Currently in text field 1 i have a custom calculation script of event.value=this.getField("drop down").value;

I have now added a second text box and would like it to auto fill a title based on a name from the drop down.  But i cant seem to get 2 export values from the drop down.  The goal will be to select a name from the drop down list. Then have text field 1 auto fill id num and text field 2 auto fill title. Help!

7 replies

PDF Automation Station
Community Expert
Community Expert
Jun 2, 2025 3:24 PM UTC
PDF Automation Station
Community Expert
Community Expert
Jun 2, 2025 2:06 PM UTC

event.value = this.getField("drop down").getItemAt(this.getField("drop down").currentValueIndices, false)

Translate
Participant
Jun 2, 2025 3:04 PM UTC

Which place would i put this script? 

Translate
PDF Automation Station
Community Expert
Community Expert
Jun 2, 2025 3:19 PM UTC

A custom calcuation script in the text field (text field 2) where you want the dropdown display value to go.  Leave your script for the export value.

Translate
Bernd Alheit
Community Expert
Community Expert
Jun 2, 2025 1:58 PM UTC

As export value you can use something like this:

 xxxx|yyyy

and fill one text field with the first part and the other field with the second part.

Translate
Participant
Jun 2, 2025 3:03 PM UTC

And how do i dictate which goes to which text box?

Translate
PDF Automation Station
Community Expert
Community Expert
Jun 2, 2025 3:20 PM UTC

First value:

event.value=this.getField("drow down").value.split("|")[0];

Second value

event.value=this.getField("drow down").value.split("|")[1];

Translate