Copy link to clipboard
Copied
Hello everyone!
I need help with scripting.
I currently have two drop-down lists on my form, and I'm trying to set up the form in a way when User select either Create New, Deactivate, or Reactivate in the first drop-down list, the second drop-down list would automatically display N/A. If the User select Modify, the second drop-down list would prompt User to choose between Role Change and User Update.
1st 2nd
Would really appreciate your help.
Thank you!
Then you can use this code as the custom Validation script of the first field (you didn't say what's the name of the other field, so I used "Dropdown2". Adjust it to the actual field name, of course):
if (event.value=="Create New" || event.value=="Deactivate" || event.value=="Reactivate") {
this.getField("Dropdown2").setItems(["N/A"]);
} else this.getField("Dropdown2").setItems(["N/A", "Role Change", "User Update"]);
Copy link to clipboard
Copied
Do you mean that you want "N/A" to be selected in the second field, or that it should be the only possible option?
Copy link to clipboard
Copied
That should be the only possible option
Copy link to clipboard
Copied
Then you can use this code as the custom Validation script of the first field (you didn't say what's the name of the other field, so I used "Dropdown2". Adjust it to the actual field name, of course):
if (event.value=="Create New" || event.value=="Deactivate" || event.value=="Reactivate") {
this.getField("Dropdown2").setItems(["N/A"]);
} else this.getField("Dropdown2").setItems(["N/A", "Role Change", "User Update"]);
Copy link to clipboard
Copied
Omg try67, you are the best!!!
I've been spending sooooo much time trying to figure this out on my own. Thank you so much for your help!!!!