Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events

how to autosum the amount column


Level 1

I have been working on a form for hours and cannot figure out how to autosum one column in a table with three columns.  the first column contains a drop down list with test, the second is just a text field and the third is a numeric field.  I want the third column labeled amount to sum at the bottom row 4.

I currently have titles in the headers --Program Area(drop-down) is first column, Reason for Purchase (text field) is second column, and Amount is third column.  I have four rows with data and the last row is for my total of column 3 Amouts.  I have a header and footer.  Please help!

1 Reply


Level 10

Write the code in the Calculate event of the Summary field in the row 4.

Use FormCalc as the language.

$.rawValue = Sum(Amount1.rawValue, Amount2.rawValue, Amount3.rawValue, Amount4.rawValue);

Change the field names to actual names in your form.