Editable Table, Auto Add the Integer in a column

Good Day Everyone, I would like to ask your opinions for logic approach for adding the values in an editable table. Sorry if I am not making myself clear.

The objective is something like this

I placed an expression beside each cell of the day. I was thinking of using SUM just like how in SQL.


Sorry I am still adjusting in outsystems. Any help would be appreciated 


 

Hi,

One possible way is to use an aggregate to calculate the sum of each column.


Something like that:

Then, an expression on table header for each day:


On row save and on row delete you should refresh the query that calculates the sum of each day and refresh the table. It will give you the desired result

Good Day Sir Bruno,

Thank you for replying. 

This is what I understood. I get the Aggregate Table and placed it in TableRowSave Action. Below I placed an Ajax Refresh on the Expression named ExpressionMondaySum. Is this right? Same thing I did on TableRowDelete. 


But then when I was placing the "TOTAL: " + TableName.List.Current.MondaySum, I cannot seem to find it. Do I have to add the Aggregate Table to the Preparation?


Late Information: The Source Record List of the EditableTable came from an API then stored in a Local Variable with structures. 

Sorry If I am being vague since the information, entities and structure being used are confidential. 


Quick Update (Approach made)


Tried calling the local variable(structure) with the structure composing of monday, tuesday, wednesday, thursday and friday. Inside the action of EditableTableRowSave, using another variable(integer) called MondayTotal, created a For Loop. The loop list used is the local variable containing the structure. Inside the for loop created an Assign with the following expression. MondayTotal = LocalVariable.TimeTable.Current.Monday + MondayTotal. 


Still no luck. Am I doing this the wrong way?