Copy link to clipboard
Copied
Hi,
I want to have a dropdown list where there is a main dropdown list and if you select that, linked items from the main dropdown will appear in the 'sub' dropdown list. Please help.
P.S. I already saw answers but it replaces the items already added in the dropdown list. What I want is a SCRIPT that if you select an item from the MAIN dropdown it will also display the items from the SUB dropdown you linked to it in the SUB Dropdown.
ex.
if you select profile 2
expected result: ('#2' and 'ID-23909' is already added in the dropdown field)
* Dropdown 2 will show #2
* Dropdown 3 will show ID-23909
Copy link to clipboard
Copied
Hi @avv98
Hope you are doing well and thanks for reaching out.
The workflow you are trying to achieve is might be possible using JavaScript. For more information please check the help pages listed below:
https://adobe.ly/48IWXmH
https://adobe.ly/48IWXDd
Hope it will help
Regards
Amal
Copy link to clipboard
Copied
can you recommend a script
Copy link to clipboard
Copied
If those values already exist in the lists of the two other drop-downs then you can use this code (as the custom Validation script of the first one) to populate them with the desired values:
if (event.value=="Profile 2") {
this.getField("Dropdown2").value = "#2";
this.getField("Dropdown3").value = "ID-23909";
}