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

Formula that calculates sum when two checkboxes are selected

New Here ,
Jan 13, 2025 Jan 13, 2025

Copy link to clipboard

Copied

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

Views

85

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
1 ACCEPTED SOLUTION
Community Expert ,
Jan 13, 2025 Jan 13, 2025

Copy link to clipboard

Copied

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

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

Copy link to clipboard

Copied

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.

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

Copy link to clipboard

Copied

LATEST

thank you! That worked perfectly

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