Looping through EditableTable list is inaccurate
Application Type
Traditional Web

I am using EditableTable and don't need to save/delete everytime I press its built in buttons. I need to calculate a variable (let's say Total) from each row in the table. 

For example I have three rows with value 1, 2, 3. Then I remove 3, my Total became 6, instead of 3. Then I remove 2, Total became 3, instead of 1. I have the calculations (looping through EditableTableList) inside the On Row Save and On Row Delete events of the EditableTable to be able to update the Total variable everytime I add/delete rows, but I'm getting it wrong. Any idea how to achieve this?

EDIT: I attached a simple oml with the problem.



Hi Kenneth,

I have added the screen shots for your reference. The local variable total is being updated on each delete and add row. and the result is as expected . Please refer and let me know if this helps - 

The Value is header and count is the integer value on the list.

The expression below is the total value.

Below is the logic on delete row.

The issue can be you must be using the current of your data instead of the current variable from the table widget.

Try updating the value with the current of the table widget and this should resolve your issue.

You can try https://unnati-khanorkar.outsystemscloud.com/TestEditableTable/Entry1.aspx?_ts=637432228052838783 

I have added for Delete row. You can do similar changes for Add Row.


Unnati K