Skip to main content
Participant
October 2, 2019
Question

Acrobat Pro DC display greatest value between multiple fields.

  • October 2, 2019
  • 2 replies
  • 296 views

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!

This topic has been closed for replies.

2 replies

Inspiring
October 2, 2019

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);

Bernd Alheit
Community Expert
Community Expert
October 2, 2019

You can use the Math.max function.