Skip to main content
Known Participant
Sep 16, 2021 1:52 PM UTC
Question

Column Sum in a Grid

Hi,

Can someone please provide a small & clear example of code snippet on how to find total for column values in a grid ?
I am new to Appian and finding difficult in understanding the related blogs & docs.

Usecase: I have two columns. Rows appear upon clicking Add Dynamic link. last row of the grid should have Total/Sum of respective columns row data

8 replies

mikes0011
Brainy
Sep 16, 2021 2:02 PM UTC

Do you have any example code for what you've tried so far?

The Expression Guru
Known Participant
Sep 16, 2021 2:07 PM UTC

Thank you Mike for the response. Here is my code 
[View:/cfs-file/__key/communityserver-discussions-components-files/13/gridtest.txt:64:59]

I have tried this. But not able see Total label at all.
Also not sure how can I sum up values.

mikes0011
Brainy
Sep 16, 2021 2:11 PM UTC

Can you clarify - are you intending to make a separate column for each row of data in local!gridQuestionsList?  That seems counter intuitive to the way an editable grid would normally work.

The Expression Guru
abhayd3663
Brainy
Mar 6, 2023 10:13 PM UTC

You can have the textField just below the grid to display the total, it would be easier.