Skip to main content
Participant
Jan 13, 2025 3:36 PM UTC
Answered

Formula that calculates sum when two checkboxes are selected

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!

PDF Automation Station
Community Expert
Jan 13, 2025 4:14 PM UTC

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.

2 replies

PDF Automation Station
Community Expert
Community Expert
Jan 13, 2025 4:14 PM UTC

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
mhca1Author
Participant
Jan 13, 2025 4:20 PM UTC

thank you! That worked perfectly

Translate