Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Automatically generate an abbreviation from one field to another

Guest
Aug 08, 2019 Aug 08, 2019

I have a long drop down list of countries in one field and i want to generate an automatic abbreviation for those counties in another field

for example if I choose France from the drop down field, i want the other field to automatically show FRA,

and if i choose Kuwait from the drop down, i want the other field to show KWT and so on...

TOPICS
PDF forms
714
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 08, 2019 Aug 08, 2019

In the dropdown list use the abbreviations as export values. Then you can use the selected value in the other field.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Aug 09, 2019 Aug 09, 2019

can you please further explain what you said, i am veryyy new to adobe

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 09, 2019 Aug 09, 2019

In the properties of the dropdown list you can assign the export values to entries of the list.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Aug 09, 2019 Aug 09, 2019

does anyone know a simple script that can generate that??

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 09, 2019 Aug 09, 2019
LATEST

Once you apply the export values as Bernd described you can use a simple script to copy the selected value to the text field.

If the drop-down is called Countries you can use this as the custom calculation code of the text field:

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

The values themselves can also be applied using a script, like this:

this.getField("Countries").setItems([["Kuwait", "KWT"], ["United States", "USA"]]);

If you already have the names and codes in a text file or spreadsheet then you can use this (paid-for) tool I've developed to easily import everything at once, without having to write any code yourself: Custom-made Adobe Scripts: Acrobat -- Import Items from a Text File to a Combo-Box or List Field

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines