Editable table doesn't reflect on database?

Editable table doesn't reflect on database?

  

I created an Editable Table on a page of mine. If I launch the web app, the rows are editable - adding, removing, editing works, however, if I reload the page, the modifications are lost even if I press the little tick: the editing doesn't reflect on the database. What should I do to commit the changes to the database? Thank you!

Did you create an On Row Save action for the table? If you select "(New Screen Action)" in the drop-down box it will create the action automatically.

 wrote:

Did you create an On Row Save action for the table? If you select "(New Screen Action)" in the drop-down box it will create the action automatically.

I did that, see attached, but I'm not sure it's doing the right thing.


Can you show us your RefreshLoggerTable action?

Zachary wrote:

Can you show us your RefreshLoggerTable action?

Sure! :)


Solution

Right, I see the problem. When you use an aggregate (or an SQL query) to get data from the database it is creating a local copy of the information, editing the values in the table edits that local copy. To copy that back to the database you need to use the CreateOrUpdate[tablename] action of the database table.

You can do that inside your RefreshLoggerTable action if you want but it would be better to have a separate action for it. If you select the "(New Screen Action)" value in the dropdown it creates such an action, including the CreateOrUpdate[tablename], automatically.

Solution