Skip to main content
Participant
March 5, 2020
Answered

Acrobat DC Pro - Reset 2 interdependent dropdown values to their defaults

  • March 5, 2020
  • 2 replies
  • 560 views

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

 

 

This topic has been closed for replies.
Correct answer try67

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;

2 replies

Bernd Alheit
Community Expert
Community Expert
March 5, 2020

Use this:

event.rc = false;

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
March 5, 2020

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;