Process improvement: update of dropdown list across multiple files
Copy link to clipboard
Copied
Hello Guys,
I created a fillable form with a drop-down list of the employees's names and licenses. This drop-down list is used in multiple different forms. Every time I have a new employee hired/leaving I update each form dropdown list. I am wondering if there is a way to make this process faster or even to automate it. Any suggestions?
Thank you.
Copy link to clipboard
Copied
Hi,
If the drop-down list field has the same name on all forms, it's possible to write an JavaScript action wizard to modify all the forms.
@+
Copy link to clipboard
Copied
Thank you, bebarth. I am pretty new to Javascript. Would you have any content/courses to suggest?
Copy link to clipboard
Copied
The dropdown fields have the same name in all the forms?
Do you know how action wizards operate?
Could you give me an example of the items (and export values) for the dropdown field... and its name!
@+
Copy link to clipboard
Copied
Yes, the same names and numbers will be for all forms.
I don’t know how to use the action wizard. I checked and I have six actions available on it as you can see in the image below.
Name: NameLicense
I had no export values entered, just the names and numbers under the item list. Should I have it under export?
Item List example:
Daniela Barros – 111222
Marcel Short – 222333
Mary Stal – 444555
Copy link to clipboard
Copied
You can use an Action with this code to do it:
this.getField("NameLicense").setItems(["Daniela Barros – 111222", "Marcel Short – 222333", "Mary Stal – 444555"]);
Copy link to clipboard
Copied
Here is my proposal.
Open your first form.
The first time, you will have to create the action wizard.
Then give a name to your action.
and it will appear at the top of the list.
Click on the action wizard then on "Add Files...". If all your forms are in a same folder, you can click "Add Folder..."
Select all the files you want to modify then click "Start"
All the files will be modifyed. The selected item of each file will be kept if it still exist.
The script to paste for the action wizard is:
var fieldName="NameLicense";
try {
var selectedItem=this.getField(fieldName).value;
this.getField(fieldName).setItems(["- Select a Name -","Daniela Barros – 111222", "Marcel Short – 222333", "Mary Stal – 444555"]);
try {
this.getField(fieldName).value=selectedItem;
} catch(e) {};
this.saveAs(this.path);
} catch(e) {
app.alert("The dropdown field \""+fieldName+"\" doesn't exist on this form.",2);
}
I hope that will help you...
@+
Copy link to clipboard
Copied
Another solution is to place employees's names and licenses in a CSV file attachment.
So you will update all PDFs just by replacing the attachment.
Acrobate du PDF, InDesigner et Photoshoptographe

