Generating a Dropdown Options from two previous Dropdowns
I'm trying to have the option from Dropdown1 and the Dropdown2 generate a new set of options that populate Dropdown3. So, if someone selected Option 1 in Dropbox 1 and Option3 in Dropbox2, the options available in Dropbox3 would be ItemA, ItemB, ItemC, Item D, ItemE, ItemK, ItemL, ItemM, ItemN, and ItemO from which they could choose one. Whats happening is, whichever Dropbox1 or Dropbox2 I click on most recently is populating with its selections and deleting the previous ones. I need all 10 to populate.
The code I am currently using in Dropbox1's "Dropdown Properties - Validate - Run custom validation script":
var f = this.getField("Dropdown3");
switch(event.value){
case "Option1":
f.setItems(["ItemA", "ItemB", "ItemC", "ItemD", "ItemE"]);
break;
case "Option2":
f.setItems(["ItemF", "ItemG", "ItemH", "ItemI", "ItemJ"]);
break;
default:
f.setItems([""]);
}
The code I am currently using in Dropbox2's "Dropdown Properties - Validate - Run custom validation script":
var f = this.getField("Dropdown3");
switch(event.value){
case "Option3":
f.setItems(["ItemK", "ItemL", "ItemM", "ItemN", "ItemO"]);
break;
case "Option4":
f.setItems(["ItemP", "ItemQ", "ItemR", "ItemS", "ItemT"]);
break;
default:
f.setItems([""]);
}
