• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Acrobat Pro DC display greatest value between multiple fields.

New Here ,
Oct 02, 2019 Oct 02, 2019

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!

TOPICS
Acrobat SDK and JavaScript

Views

206

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
community guidelines
Community Expert ,
Oct 02, 2019 Oct 02, 2019

Copy link to clipboard

Copied

You can use the Math.max function.

Votes

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
community guidelines
LEGEND ,
Oct 02, 2019 Oct 02, 2019

Copy link to clipboard

Copied

LATEST

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

Votes

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
community guidelines