Copy link to clipboard
Copied
I have a calculation in Acrobat Pro CC
text4 * text5
The results can be <= 250.
Sorry, replace Math.max with Max.min in the code above.
Copy link to clipboard
Copied
You have not explained what action you want taken if the result is not less than 250.
You can use and "if then statement, or possibly the Math.max method.
Copy link to clipboard
Copied
Sorry I did not explain myself well. I have two fields that I am multiplying in Acrobat CC (text4 * text5).This represents the total my company will pay towards holiday gifts for sales reps, but this amount can not exceed 250. So even if the results is more than 250, the answer can not show more than 250.
Hope this clarifies my problem
Copy link to clipboard
Copied
Use this code as your custom calculation script:
var v1 = Number(this.getField("text4").value);
var v2 = Number(this.getField("text5").value);
event.value = Math.max(250, v1*v2);
Copy link to clipboard
Copied
The calculations starts with a 250 value seem to only calculate the amount over 250.
Copy link to clipboard
Copied
Sorry, replace Math.max with Max.min in the code above.
Copy link to clipboard
Copied
THANK YOU! Works great.