Copy link to clipboard
Copied
Hi, I have two sets of 10 interdependent dropdowns.
The first set is named "OC TFV YN 1" to "OC TFV YN 10"
The second set is named "OC T YN 1" to "OC T YN 10"
Each dropdown has options "Yes" and "No".
No two dropdowns with the same number can be "Yes".
e.g. "OC TFV YN 1" and "OC T YN 1" cannot both be "Yes". They can both be "No" or one can be "Yes" and the other "No".
What I want to do is, if the user tries to set both to "Yes" is to give a message that both cannot be "Yes" (this part was easy) and then reset both to "No".
After searching the community, I have tried using
this.resetForm(["OC T YN 1"]);
this.resetForm(["OC TFV YN 1"])
in the validation script for both dropdowns. The option "Commit selected value immediately" is checked on both dropdowns.
Whilst the script works by resetting the "other" dropdown it does not reset the dropdown from which it is invoked.
Any help would be appreciated.
Raymond
Resetting a field returns it to its default value.
If "No" is the default value then your code should work for the other field, but not of the one that is being edited because you can't change a value while the user is also doing that. What you can do it reject the user's value by using this command:
event.rc = false;
Copy link to clipboard
Copied
Resetting a field returns it to its default value.
If "No" is the default value then your code should work for the other field, but not of the one that is being edited because you can't change a value while the user is also doing that. What you can do it reject the user's value by using this command:
event.rc = false;
Copy link to clipboard
Copied
Use this:
event.rc = false;