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

Stop calculations

Participant ,
Jun 19, 2016 Jun 19, 2016

I have this script attached two different buttons one to halt the calculations and the other button to perform the calculations:

   // Turn Calculations On

   this.masterCalc = this.calculate = true;

   this.calculateNow();

   // Turn Calculations Off

   // Use Master Calc to control calculations in other areas

   this.masterCalc = this.calculate = false;

What I would like to do is, is to apply these commands to only certain fields, not the entire form and all the fields. Like field1, field2, field3, field4 and leave the rest of the fields alone.

Can someone please tell me how would I add the named fields to the turn on/off calculation script above? Thanks for the help.

TOPICS
Acrobat SDK and JavaScript , Windows
353
Translate
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 ,
Jun 19, 2016 Jun 19, 2016

Do you know how to execute conditional blocks of code?

You will need all the calculations you want conditionally executed to use the "Custom JavaScript calculation" option. You then could add code to test if your flag not to calculate was set  and if so then skip the calculation script;

Translate
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
Participant ,
Jun 19, 2016 Jun 19, 2016
LATEST

What would the script look like? I learn more from example. Would you mind showing me an example?

Translate
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