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

Formula that calculates sum when two checkboxes are selected

New Here ,
Jan 13, 2025 Jan 13, 2025

Looking for help to create a formula for a text field under these conditions:

- if neither of the checkboxes is selected, the calculation is 0

- if only 1 of the 2 checkboxes is selected, the calculation is 0

- if both checkboxes are selected, the calculation is 2

 

thanks!

TOPICS
PDF forms
365
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 Expert ,
Jan 13, 2025 Jan 13, 2025

Enter the following custom calculation script in the text field:

if(this.getField("Check Box1").value!="Off" && this.getField("Check Box2").value!="Off")
{event.value=2}
else
{event.value=0}

Change the check box field names to match yours, of course.

View solution in original post

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 ,
Jan 13, 2025 Jan 13, 2025

Enter the following custom calculation script in the text field:

if(this.getField("Check Box1").value!="Off" && this.getField("Check Box2").value!="Off")
{event.value=2}
else
{event.value=0}

Change the check box field names to match yours, of course.

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
New Here ,
Jan 13, 2025 Jan 13, 2025
LATEST

thank you! That worked perfectly

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