Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Script for Calculation of Check Boxes

Avatar

Level 2

I have four checkboxes, each one with a different dollar amount. I want to have a total, calculated and shown, in a numerical field based on whichever checkboxes are checked. Please help.

Checkbox #1 (if checked =$125, not checked =$0)

Checkbox #2 (if checked =$ 90, not checked =$0)

Checkbox #3 (if checked =$ 10, not checked =$0)

Checkbox #4 (if checked =$ 35, not checked =$0)

Total = $260 (if all four checked)

Total = $125 (if 2 and 4 are checked)

0 Replies

Avatar

Level 6

You can add the value to your check box in the "on" position. 

Click on checkbox 1 and use the "Binding" tab of the Object pallette.  In the ON value box, type 125. 

Repeat for checkboxes 2-4 designating the correct value.

To your numeric field, first set the data pattern to $Z,ZZ9.99. 

Then add the formCalc script:  Sum(CheckBox1, CheckBox2, CheckBox3, CheckBox4)

Let us know if you need more help