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

Recalculate upon exiting a field

Contributor ,
Feb 04, 2018 Feb 04, 2018

Copy link to clipboard

Copied

I have a form with 10 fields (type: number). The first field is Income. The remaining input fields are other payroll related numbers in which User would type a number or select from options that return a number. There are also ten other read-only fields that run calculations based on the input fields as user updates them. Because of "Order of Calculation", if User completes any number of input fields, and then wishes to test a different amount in Income in that first field, the calculable read-only fields are unaffected (in other words, the calculations remain related to the original Income input, not the updated Income input). My current solution is to have the entire form reset to zeros upon mouse-down in Income. This is an unsatisfactory semi-solution, because User must go through and re-type or select the remaining 9 fields again. I would rather have all the read-only fields simply recalculate upon mouse exit from Income.

If you know of a way to do this - especially without writing a long script that calls upon each of the read-only fields, individually, to recalculate (kind of a "Recalculate All" function), please let me know.

TOPICS
Acrobat SDK and JavaScript , Windows

Views

538

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
LEGEND ,
Feb 04, 2018 Feb 04, 2018

Copy link to clipboard

Copied

Check the order the fields are calculated in and open the JavaScript console to see if there any script errors.

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
Contributor ,
Feb 04, 2018 Feb 04, 2018

Copy link to clipboard

Copied

Ok, will do. But, from your response I'm inferring if the fields are in proper order and there are no errors, then I would not have a problem and the fields should automatically recalculate when I change Income. Is that correct?

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
LEGEND ,
Feb 04, 2018 Feb 04, 2018

Copy link to clipboard

Copied

Unless you turn off calculations they should recalculate whenever a field used in a calculation is changed.

If you change another field and the calculations update or some due then there is a problem.

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
Contributor ,
Feb 05, 2018 Feb 05, 2018

Copy link to clipboard

Copied

LATEST

Thank you. After checking calculation order and no errors, I got rid of the Reset All Fields action and the form is working again. I must have had an error, earlier, and have since fixed it.

Thanks again.

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