Skip to main content
Participant
September 15, 2019
Question

Setting the export Value of a drop down menu to the value of another field

  • September 15, 2019
  • 2 replies
  • 1295 views

As the subject implies, I'm trying to make the Export Values of 3 items in a drop down menu, equal one of 3 text boxes.

 

Item1, Item2, and Item3 in the drop down should all have Export Values equal to the value of Text1, Text2 and Text3 respectively. All 3 texts can be changed, so I can't set the Export Values statically. Depending on your drop down choice that value then gets put into Text4 box for calculations.

 

e.g. Text1 = 5, Text2 = 3, and Text3 = 6.

If you choose Item2, the calulation in Text4 should be (Item2+10) which would show 13 in this example. If you then change the drop down to Item3, Text4 would show 16. If you change Text3 to 2, Text4 would show to 12.

 

Any help on this conundrum would help greatly!

 

 

    This topic has been closed for replies.

    2 replies

    ls_rbls
    Community Expert
    Community Expert
    September 15, 2019

    I forgot to add this thread:

    https://community.adobe.com/t5/Acrobat/Show-Default-Value-in-Text-Field-Until-User-Inputs-Data/td-p/10003538

     

    It seems to achieve better what you are trying to do

    ls_rbls
    Community Expert
    Community Expert
    September 15, 2019

    If I understood correctly,

     

    You can assign an export value to each listed item in the dropdown. It is static but this simple method that I've tried before works.

     

    Unless you need Text1, text2 and text3 to be visible to the user it will be unnecessary if you only use  dropdown menus instead of text fields with a predefined value.

     

    So, in the dropdown  field that you want to display the export value, rename it to "exported value" (for example); In that dropdown field you are going to tick the option that says "allow user to enter text" (or similar option); then add the following custom calculation script:

     

    event.value = this.getField("Item1").value+10;

     

    And then in Text4 field add a custom calculatiom script like:

     

    event.value = this.getField("exported value").valueAsString;