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
BedrockMission!

Learn More

View all

Sign in to view all badges

Script to calculate fields

Avatar

Avatar
Level 1
anthony_willia2
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
View profile

Avatar
Level 1
anthony_willia2
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
View profile
anthony_willia2
Level 1

04-05-2016

I am new to LifeCycle Designer and need a field to show the sum of checkboxes i select throughout the form.  Can anyone please assist?

Accepted Solutions (0)

Answers (1)

Answers (1)

Avatar

Avatar
Validate 10
Level 3
SI_MSD7
Level 3

Likes

17 likes

Total Posts

220 posts

Correct Reply

10 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile

Avatar
Validate 10
Level 3
SI_MSD7
Level 3

Likes

17 likes

Total Posts

220 posts

Correct Reply

10 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile
SI_MSD7
Level 3

04-05-2016

There are several ways to accomplish this depending on the design/layout/structure of your form.

One simple way is by using 3 different check boxes with different names, and a numeric field to display the sum. NOTE: all fields in this example are contained within the same subform:

Check box field names (NOTE: the export value of each check box is equal to "1" when checked, "0" if unchecked):

Checkbox1

Checkbox2

Checkbox3

Numeric field name:

TotalField

FormCalc script on TotalField, using "calculate" event:

$ = Sum(Checkbox1,Checkbox2,Checkbox3)

OR

Javascript script on TotalField, using "calculate" event:

this.rawValue =  Checkbox1.rawValue + Checkbox2.rawValue + Checkbox3.rawValue;

As mentioned, there are several ways of accomplishing this task. The above is a basic approach.

Hope this helps.