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

Acrobat calculation with results maximum

New Here ,
Oct 10, 2017 Oct 10, 2017

Copy link to clipboard

Copied

I have a calculation in Acrobat Pro CC

text4 * text5

The results can be <= 250.

TOPICS
PDF forms

Views

2.2K

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

correct answers 1 Correct answer

Community Expert , Oct 10, 2017 Oct 10, 2017

Sorry, replace Math.max with Max.min in the code above.

Votes

Translate

Translate
LEGEND ,
Oct 10, 2017 Oct 10, 2017

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.

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
New Here ,
Oct 10, 2017 Oct 10, 2017

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

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
Community Expert ,
Oct 10, 2017 Oct 10, 2017

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

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
New Here ,
Oct 10, 2017 Oct 10, 2017

Copy link to clipboard

Copied

The calculations starts with a 250 value seem to only calculate the amount over 250.Screen Shot 2017-10-10 at 10.10.30 AM.pngScreen Shot 2017-10-10 at 10.09.23 AM.png

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
Community Expert ,
Oct 10, 2017 Oct 10, 2017

Copy link to clipboard

Copied

Sorry, replace Math.max with Max.min in the code above.

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
New Here ,
Oct 10, 2017 Oct 10, 2017

Copy link to clipboard

Copied

LATEST

THANK YOU! Works great.

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