Skip to main content
Participant
January 13, 2025
Answered

Formula that calculates sum when two checkboxes are selected

  • January 13, 2025
  • 1 reply
  • 360 views

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!

Correct answer PDF Automation Station

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.

1 reply

PDF Automation Station
Community Expert
Community Expert
January 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.

mhca1Author
Participant
January 13, 2025

thank you! That worked perfectly