Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

"Total" numeric field that sums multiple numeric fields from multiple pages

Avatar

Former Community Member

I have a number of numeric fields that I would like to total up. I have created a numeric field that will serve as the total and need a script that will add them up. All the fields that need to be added have the binding name INTVL_n (INTVL_1, INTVL_2, etc.). The fields also reside on multiple pages.

Thanks!

1 Accepted Solution

Avatar

Correct answer by
Level 7

You need to override the calculate event for the field that you want the calculated value to appear. While the cursor is in the script window, ctrl-click on the fields you want to sum up. LiveCycle will automatically write the SOM expressions required to reference that field.

View solution in original post

2 Replies

Avatar

Correct answer by
Level 7

You need to override the calculate event for the field that you want the calculated value to appear. While the cursor is in the script window, ctrl-click on the fields you want to sum up. LiveCycle will automatically write the SOM expressions required to reference that field.

Avatar

Level 1

Hello, I have done as you have mentioned above (totalling multiple numeric fields on two separate pages with binding name LPremium, LPremium_1, etc. by CTRL-Click all the fields. Total field is a cell in a table on page 1 of the form).  However, the total field is only displaying the number entered in the last LPremium numeric field.  Any ideas?