Highlighted

If/Then statement for different boxes

Explorer ,
Jun 23, 2020

Copy link to clipboard

Copied

Basically, I have two text boxes. In one textbox, I want to make it so if someone rights a specific number, another number will appear in the other text box.

 

So in textbox 1, someone writes 30, the other box will automatically write down 45. And if they change it to 31, the other number will change to 63, so on and so forth. The problem is there is no way to do it with simple math, so I have to be able to choose which number corresponds to which number.

Topics

How to

Views

30

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

If/Then statement for different boxes

Explorer ,
Jun 23, 2020

Copy link to clipboard

Copied

Basically, I have two text boxes. In one textbox, I want to make it so if someone rights a specific number, another number will appear in the other text box.

 

So in textbox 1, someone writes 30, the other box will automatically write down 45. And if they change it to 31, the other number will change to 63, so on and so forth. The problem is there is no way to do it with simple math, so I have to be able to choose which number corresponds to which number.

Topics

How to

Views

31

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jun 23, 2020 2
try67 LATEST
Most Valuable Participant ,
Jun 24, 2020

Copy link to clipboard

Copied

You can use something like this as the custom calculation script of the second field:

 

var s1 = this.getField("textbox 1").valueAsString;

if (s1=="30") event.value = "45";

else if (s1=="31") event.value = "63"; // etc.

else event.value = "";

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 24, 2020 2