I have 20+ forms that have a common dropdown. Each form has between 1 and 15 instances of this dropdown. The values in the dropdown are updated on a frequent basis.
Currently I have an identical Document JavaScript named 'UpdateDropdowns' in each form.
function update_dropdowns()
{
var aList = [" ", "A", "B", "C"];
//Add any other dropdown choices in the var aList in the format shown
getField("TradeNameDropdown1").setItems(aList);
getField("TradeNameDropdown2").setItems(aList);
// Add any other dropdowns added to the form in the format shown
}
There are over 30 choices in my present iteration of var aList, but for brevity I've only listed the 3 examples to illustrate my JavaScript.
Currently when I have to update the dropdown, I follow these steps
- Open form
- Open UpdateDropdowns Document JavaScript
- Add the additional value(s)
- Highlight and copy the updated var aList
- Close the Document JavaScript
- Update the form in the Log Console
- Repeat process for all forms (pasting in the new var aList to ensure conformity)
Is there a way to update all of my forms at once without having to go through this form by form process?