Totaling columns and rows in a grid

This form can be downloaded and imported into your Workflow Automation instance. The downloadable JSON file is at the bottom of this page. For information on importing forms, refer to this guide.

This form uses custom JavaScript to total both rows and columns. Rows 1–3 and 4–6 are separate zones, as are the 2020 and 2021 columns. This script uses one event handler and several loops.

It also uses an OnChange event, and then totals up the columns for rows 1–3 and 4–6 separately. Afterward, another loop totals up the months by row and then adds the 2021 value as needed to the 2020 total.

The JavaScript is included in the form template. It’s provided as an example and is not supported by Workflow Automation. Refer to our JavaScript reference page for more information.

Form

grid-numbers-js.png

Download the Form