Editable Table - OnRowSave not fetching current row

So i have an editable table with two screen actions for OnRowSave and OnRowDelete. I noticed that the current row works in OnRowDelete action. However, when it comes to the OnRowSave action, instead of fetching the current row, it always returns the last row. Has anyone else experienced this problem as well? If so, how can i get around this?

you can try create a parameter on the OnRowSave action that you are using and pass the current table row number that way u will have the row you are working on. 


The problem you are having seems you are not using the table current row but the agreggate current row.


Just try it


BR

Hi BPal,

Make sure you use the Widget, not the bound Aggregate, to fetch the Current. E.g., if I drag/drop a simple Screen with an Editable Table of the User Entity, and add a On Row Save, Service Studio automatically adds a CreateOrUpdateUser with Table1.List.Current.User (and not GetUser.List.Current.User).

I double-checked and i'm passing the current from the editable table, not the aggregate. 

The thing is, when i create, the editable table current fetches the right record but for some reason, when i'm editing, it always fetches the last record from the table.

bpal98 wrote:

I double-checked and i'm passing the current from the editable table, not the aggregate. 

The thing is, when i create, the editable table current fetches the right record but for some reason, when i'm editing, it always fetches the last record from the table.

Hi bpal98,

Maybe because on your Save Action, before you save the record, you are using a For Each to iterate over all the records (for some kind of validation?), and this will "move" the current position of the Edit Table Source List until the end.

Then, when you access the "current", you are accessing the Last record of the list.

Hope that helps you.

Thank you,

Alberto