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

Calculate Value Not Saving

Community Beginner ,
Dec 15, 2023 Dec 15, 2023

I have a form that totals the number of boxes checked. They are named “Check Box1” through “Check Box24”. There were only 23 when this form was originally built and functioned properly. I now added the 24th, but it doesn’t calculate in the total. The Text Field Properties are set to “Value is the sum(+)” but when I select “Check Box24” it doesn’t save. If I click OK and go right back into Pick, it shows as unchecked again. What am I doing wrong?

__PRESENT

__PRESENT

TOPICS
PDF forms
2.5K
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
1 ACCEPTED SOLUTION
Community Beginner ,
Dec 15, 2023 Dec 15, 2023
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
Community Beginner ,
Dec 15, 2023 Dec 15, 2023
 
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
Community Expert ,
Dec 15, 2023 Dec 15, 2023

Try use this as custom calculation script instead:

var count = 0;
for(var i=1; i<=24; i++){
if(this.getField("Check Box"+i).valueAsString !== "Off")
count++;}
event.value = count;
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
Community Beginner ,
Dec 15, 2023 Dec 15, 2023

Thanks so much for the reply. When I paste that into Custom Calulation Script, it immediately defaults to "Value is not Calculated". Any ideas?

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
Community Expert ,
Dec 15, 2023 Dec 15, 2023

Try to reset acrobat and even PC and try again, if that doesn't help, share actual file with us.

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
Community Beginner ,
Dec 15, 2023 Dec 15, 2023

Resetting didn't help, but I opened it on another computer and was able to select the check box #24. So that is resolved! 
Wondering if you can help with the next bit. I don't know what tells it to highlight the correct price break when X number of boxes are selected. The first two price break blocks work fine but the last two are mixed up. Also, if all 24 are selected, the Preferred Partner logo and Congratulations text should appear. Right now they appear when 23 are selected. Can you help? File attached.

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
Community Expert ,
Dec 15, 2023 Dec 15, 2023

In the "Cost" field you have a calculation script that affect hiding/showing fields, if you look at the script you can see how many checkboxes are required to trigger each condition.

Also, if all 24 are selected, the Preferred Partner logo and Congratulations text should appear. Right now they appear when 23 are selected

The last condition is set to 23 checkboxes, you may want to change it to 24.

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
Community Beginner ,
Dec 15, 2023 Dec 15, 2023
LATEST

Thank you so much! That worked perfectly! Really appreciate the help.

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