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

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

477

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

Copy link to clipboard

Copied

How does you fill the fields?

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 ,
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.

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

Copy link to clipboard

Copied

Was the form saved with the wrong TOTAL value? 

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 ,
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). 

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

Copy link to clipboard

Copied

LATEST
Sounds GREAT! 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