Copy link to clipboard
Copied
I've found many different similar options but most of what I've found are severely dated.
I am using Adobe Acrobat Pro DC. I have 6 numeric text fields and in the 7th field I need to create a custom script to display the highest/greatest/Max number between those 6 fields.
The field titles are:
SeptSteps (user input number)
OctSteps (user input number)
NovSteps (user input number)
DecSteps (user input number)
JanSteps (user input number)
FebSteps (user input number)
TotalSteps (Read Only, need to display highest number of the previous 6)
Could anyone please assist? Thanks in advance!
Copy link to clipboard
Copied
You can use the Math.max function.
Copy link to clipboard
Copied
For the Cuatom calculation scrlpt of the TotalSteps field:
var Sep = +this.getField("SeptSteps").value;
var Oct = +this.getField("OctSteps").value;
var Nov = +this.getField("NovSteps").value;
var Dec = +this.getField("DecSteps").value;
var Jan = +this.getField("JanSteps").value;
var Feb = +this.getField("FebSteps").value;
event.value = Math.max(Sep, Oct, Nov, Dec, Jan, Feb);