Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.

Calculating Fields

Avatar

Level 3

I have a table(10 Columns, 5 rows)  with  one of the columns are total fields, and the very bottom row has totals. i'm able to sum the fields from Left to  right along the  row.    However, when I try to sum up a column (top to bottom) the fields don't validate and the calculation does not occur.

3 Replies

Avatar

Level 10

You can place the code in the Calculate event of the control (where Sum Total needs to be displayed)

In the below example, Cell2 in Row5 is the Total Field. I am summing up Cell2 field in each row and assigning the value to the Cell2 field in Row5..

form1.page1.Table1.Row5.Cell2.rawValue = form1.page1.Table1.Row1.Cell2.rawValue +

                                                                form1.page1.Table1.Row2.Cell2.rawValue +

                                                                form1.page1.Table1.Row3.Cell2.rawValue +

                                                                form1.page1.Table1.Row4.Cell2.rawValue;

Thanks

Srini

Avatar

Level 2

Is the only way to sum cells? Is not a short way to do it like =(cell1:cell30) ?

Thank You

Avatar

Former Community Member

In FormCalc you could use Sum(Row[*].Cell2.rawValue)