Acrobat Form - calculated fields don't update initially, but work otherwise

New Here ,
Jan 29, 2021 Jan 29, 2021

Copy link to clipboard

Copied

I have a working table, where the TOTAL line at the bottom correctly calculates the sum of all the fields above it.    This works when you're in one of the fields above it and tab out of that field.

 

However, when the document opens, I'd like the sum to be done initially.    Is this possible?

 

Thanks!

 

(p.s. I'm pretty good w/ AEM Designer/Livecycle - Acrobat is new to me...)

TOPICS
How to, PDF forms

Views

41

Likes

translate

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 ,
Jan 29, 2021 Jan 29, 2021

Copy link to clipboard

Copied

How does you fill the fields?

Likes

translate

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 ,
Jan 29, 2021 Jan 29, 2021

Copy link to clipboard

Copied

The user fills the fields normally, i.e., mouse in, key in a (new) number,
leave the field by tabbing or mouse elsewhere. That triggers the
calculation o the TOTAL field just fine.

It just doesn't calculate the first time the form loads - so the initial
TOTAL value is incorrect.

Likes

translate

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 ,
Jan 29, 2021 Jan 29, 2021

Copy link to clipboard

Copied

Was the form saved with the wrong TOTAL value? 

Likes

translate

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 ,
Jan 29, 2021 Jan 29, 2021

Copy link to clipboard

Copied

Usually, when you have a form, and add data, the sum would be calculated while you are entering data, so when you save the file and re-open it, the correct value should be shown. Are you adding the data programatically via another application? 

 

In that case, you can trigger a calculation with a document level script: Select to create a document level JavaScript and then remove the function stub that's added by default. Anything you know add will be executed when the PDF file is opened in Acrobat or Reader. 

 

What I would do is create the calculation script as another document level script, which you can call from the field calculation script for your sum field. But, because it's now a separate script, you can call it any time you want (e.g. from your "do this when the file is opened" document level script). 

Likes

translate

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 ,
Jan 29, 2021 Jan 29, 2021

Copy link to clipboard

Copied

Sounds GREAT! Thanks!

Likes

translate

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