Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


Custom Calculation doesn't always update

Community Beginner ,
May 27, 2021 May 27, 2021

Copy link to clipboard

Copied

I can't figure out why my custom calculation isn't updating...? If I go from left to right then the custom calculations work fine but if I bounce in between cells onthe paper then the % of inventory stops updating... as you can see here I went back and deleted the middle room pool group number (which was 5) but the percent remained 45....? Any help? I've read about setting the calculation order but what if you bounce around on the paper? How can I get it to always recalculate....Thanks in advance!

Alaina5CC0_1-1622156233578.png

 

TOPICS
PDF forms

Views

537

Likes

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 2 Correct answers

Community Beginner , Jun 03, 2021 Jun 03, 2021
Thank you so much!!! That fixed it!!  -- One last question...I'm getting this error .. any advise on fixing that? I didn't change the format form before and this is the first time I am getting this error.

Likes

Translate

Translate
Adobe Community Professional , Jun 03, 2021 Jun 03, 2021
You are missing an  "else" in "INVENTORY OFFERED" field script. if (v2==0) event.value = ""; else event.value = v1/v2;

Likes

Translate

Translate
Adobe Community Professional ,
May 27, 2021 May 27, 2021

Copy link to clipboard

Copied

Check the calculation order. The calculation order is completely independent of the order of entered data. So it doesn't matter if you skip around. 

If that's not the issue, then there may be an error causing the issue. Look in the Console window to see if there are any messages. 

 

 

 

 

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

Likes

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 ,
Jun 02, 2021 Jun 02, 2021

Copy link to clipboard

Copied

Thanks Thom- the calulation order looks correct ot me unless I'm totally missing something? But sometimes the caluclations just fail--if I bounce back in forth in the document. I've attached. Any other ideas? Any input is appreciated! Thanks!

Likes

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
Adobe Community Professional ,
Jun 03, 2021 Jun 03, 2021

Copy link to clipboard

Copied

In field calculation order field "Z" should be second to last, and
"INVENTORY OFFERED" should be last field (on the bottom) and field "U" should be before "V".
Also in "INVENTORY OFFERED" you didn't check for 0 'if(v2==0)'

Likes

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 ,
Jun 03, 2021 Jun 03, 2021

Copy link to clipboard

Copied

Thank you so much!!! That fixed it!! 🙂 -- One last question...I'm getting this error .. any advise on fixing that? I didn't change the format form before and this is the first time I am getting this error. Capture.JPG

Likes

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
Adobe Community Professional ,
Jun 03, 2021 Jun 03, 2021

Copy link to clipboard

Copied

You are missing an  "else" in "INVENTORY OFFERED" field script.

if (v2==0) event.value = "";
else
event.value = v1/v2;

 

Likes

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 ,
Jun 04, 2021 Jun 04, 2021

Copy link to clipboard

Copied

LATEST

You.Are.Awesome! I totally missed that!!! Thanks!

Likes

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