Hey again @cz0840! I just responded to you over here, but can pick up this conversation and elaborate a bit on what @MiguelOrtiz is suggesting.
Because the table's changesetArray
is read-only, we are forced to directly update the source data instead. This usually means updating the backing database, but we can alternatively store the results of the initial query in a temporary variable and update that, instead. Based on your use case, the former is probably sufficient.
I've put together a quick example here (94.2 KB). The first thing to note is that I've set up an onChange
event handler on the table such that any changes result in the updateData
query getting triggered.
The logic is a little convoluted, but this query will simply update the corresponding record in the database and then refresh the content of the table within Retool. The end result is the following:
Sandbox | Editor | Toula - 10 December 2024 - Watch Video
I hope that helps! Let me know if you have any follow-up questions.