Copy link to clipboard
Copied
HI,
I'm not sure what the proper etiquette is when asking questions. but here is what I want to do. When a number (this time a measurement) is entered in a text field (field_01) I would like a predetermined number to show up in another text field (field_02). The problem is the number in text field 1 would have to be between, for example greater that 50 and less than 100. Meaning when all numbers between 50 and 99 are entered in field 1 number is generated in field 2. And if a number is put in field 1 lets say, between 100 and 150, a different number is generated in field 2.
I hope this is making sense. I added a graphic. thanks so much.
Copy link to clipboard
Copied
You need to use conditional logic to do that: https://acrobatusers.com/tutorials/conditional-execution
Copy link to clipboard
Copied
The basic code would be something like this (used as the custom calculation script of field_02):
var v1 = Number(this.getField("field_01").value);
if (v1>=50 && v1<=100) event.value = "22";
else if (v1>100 && v1<=150) event.value = "44";
else event.value = "";
I used dummy values since you didn't specify what you actually want it to be...
Copy link to clipboard
Copied
It worked. You have been so nice answering my silly questions. thank you so much.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now