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

Ratio calculation

Community Beginner ,
Mar 11, 2019 Mar 11, 2019

Copy link to clipboard

Copied

I have a simple ratio calculation to perform as seen below:

if (this.getField("HiBrach").value=="")

{

event.value="";

}

else

{event.value=this.getField("HiAnk").value / this.getField("HiBrach").value;

}

"HiBrach" is derived from multiple (3) fields with a maximum value calculation performed before the ratio operation.

This works no problem.

However, how does the script change if "HiAnk" is also made up multiple fields with a Maximum value calculation.

I haven't been able to solve this!?

TOPICS
Acrobat SDK and JavaScript

Views

487

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 , Mar 11, 2019 Mar 11, 2019

Just make sure the calculation order is correct. That's all that maters.

Votes

Translate

Translate
Community Expert ,
Mar 11, 2019 Mar 11, 2019

Copy link to clipboard

Copied

It doesn't change at all... Is it not working?

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 ,
Mar 11, 2019 Mar 11, 2019

Copy link to clipboard

Copied

Just make sure the calculation order is correct. That's all that maters.

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

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 Beginner ,
Mar 12, 2019 Mar 12, 2019

Copy link to clipboard

Copied

Hi Thom,

Thanks for the response.

In checking the calculation order as suggested, I discovered a syntax error!!!

I did have to adjust the order however, thanks.

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 ,
Mar 12, 2019 Mar 12, 2019

Copy link to clipboard

Copied

LATEST

It's always something because code is complicated and must be exact. 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

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