Copy link to clipboard
Copied
I have a form for an annual performance evaluation. I have each subsection calculate to a total composite rating. This portion works fine. What I need to do is grab composite rating from text.42 box and then use that number to display a percent increase for a raise in text.50 box. There are 5 possible options, A= 0%, B=1%, C=2%, D=3%, E=4%
An example would be:
if text.42<1 then text.50=A
if text.42>= 1.01 and <1.99 then text.50=B
if text.42>=2.00 and <2.00 then text.50=C
if text.42>=3.00 and <3.99 then text.50=D
if text.42>=4.00 then text.50=E
I am struggling how to properly make this work. Any help is appreciated.
Copy link to clipboard
Copied
This is the Using the Community forum (which is the forum for issues using the forums).
Please tell us what Adobe application you are using so that this can be moved to the proper forum for help.
Copy link to clipboard
Copied
My apologies. I'm using Adobe Acrobat.
Copy link to clipboard
Copied
Your conditions are a bit confusing, but basically you can use the following code as the custom calculation script of "text.50":
var rating = Number(this.getField("text.42").valueAsString);
if (rating<1) event.value = "A";
else if (rating<1.99) event.value = "B";
else if (rating<3) event.value = "C";
else if (rating<4) event.value = "D";
else event.value = "E";