Expand my Community achievements bar.

Adobe LiveCycle Designer - Counter question

Avatar

Level 1

I have created a form. I have a repeating subform. I have checkboxes in this subform which I would like them to calculate at the bottom (in a numerical box I call "value") once I have checked the box. On the first line for example, checkbox 4 will calculate to 4. Once I go to the next line, and check checkbox 3, I would like the value in "value" to decrease by .5. And if I go the the 3rd line and place a check in checkbox 4, the value should increase by .5. Can someone help me on how to do this?

The "results for integrity" is where the results of the calculation should be displayed. The checkboxes below "remove behavioral anchors" are what's being used to calculate. For example, if you check the first checkbox on the 1st line, a 4 is to be displayed. The points go down by 1 as you move to the right (3rd checkbox a 3 is displayed and so forth). However, like I stated if you place a checkmark in the first line, first checkbox and the 4 is displayed THEN you go to the 2nd line and place a checkmark in the 2nd checkbox, the "results for integrity" value should reflect a decrease by .5 in which it should display 3.5. I hope this makes since. Please help, I know nothing about programming language, I did my best with the action builder.

3 Replies

Avatar

Level 7

in the "change" event of each checkbox put something like (in Formcalc):

if ($ == 1) then

value = value + 0.5

else value = value - 0.5

endif

- where 'value' is the name of the field you want the value to show up

Avatar

Level 1

Thank you so much for the reply. I could not find the "change" event of each checkbox I'm still looking for it however, I placed the code you suggested into the syntex box at the top and got the following errors:

adobe error.jpg

Here is my screen of where I placed your code:

adobe screen.jpg

I placed the code on each one of the checkboxes, using Value as the box where I want the result to appear. It is calculating something because when I click the preview, there is a number already in the results box (although it shouldn't be until I click 1 of the checkboxes). Any suggestions as to what I did wrong?