Logging editable table data

We are using an editable table in one of our programs. Every time a row is deleted from the table it also deletes it from the DB. Is it possible to have that row deleted from the table, but not in the DB? Where when a user adds a row in the table it does the same in the DB, but anything deleted in the table still will remain in the DB. This is so that we can run query’s later about the transactions that have taken place, while still keeping the workspace (the table) clean and tidy.


Maybe you don’t realize it because you imported our “editable table” pre-made screen, but the actual editable table feature doesn’t do anything to the DB. Any alterations to the database are purely in your user-space scripting. So the answer is ‘yes’: just alter the scripting that handles deleting rows.

I would do it by adding an extra column to the table. I would change the delete code so that instead of deleting the row, it would set the new column to a known value e.g. ‘deleted’. In the query used to populate your table, you would then addWHERE newColumn!='deleted'By doing this, the data would still remain the database but not be shown in the table.

Even better, you can call the new row ‘deleted’ and make it a boolean. Then you won’t have to do string comparison in your SQL query!

Nice simplification Bobby :thumb_left: