## Ratio calculation

Community Beginner ,
Mar 11, 2019

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!?

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

TOPICS
Acrobat SDK and JavaScript, Macintosh

Views

97

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

## Ratio calculation

Community Beginner ,
Mar 11, 2019

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!?

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

TOPICS
Acrobat SDK and JavaScript, Macintosh

Views

98

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Mar 11, 2019 0
4 Replies 4
Most Valuable Participant ,
Mar 11, 2019

Copied

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

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Mar 11, 2019 1
Mar 11, 2019

Copied

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

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Mar 11, 2019 1
Community Beginner ,
Mar 12, 2019

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.

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Mar 12, 2019 1
LATEST
Mar 12, 2019