Getting calculated Cell-Values to update, when input changes

I have a table which get's populated with data from a spreadsheet, containing account-transactions. Now there are four columns:

  • Amount: The amount of the transaction
  • NetAmount: The amount without VAT
  • VATAmount: The actual amount of only the VAT
  • VATRate: The VAT-Rate, which is a dropdown allowing certain values between 0%-19%

The user can change the VATRate, which works just fine and gives back a Float of the according tax-rate. He can then save the changes and the new VAT-Value AND the NetAmount and VATAmount (calculated based on the Amount and the VATRate) are saved back to the spreadsheet and then updated in the table.

What I can't achieve is an immediate update of the NetAmount and the VATAmount in the table (without saving), so the user can instantly see the changes.

What I tried so far, by using a Cell-Change-Event:

  • Going through table.ChangeSet and updating the according values in table.data -> nothing changes in the view
  • Going through table.recordedUpdates and updating the according values in table.recordedUpdates AND table.data-> nothing changes in the view
  • Going through table.ChangeSet and updating the according values in the original query that the table shows -> nothing changes in the view
  • Updating the according values in a copy of table.data and then use table.setData(copyOfData) to redraw the table -> The changes are shown, but now the User can't save the changes, because ChangeSet and recordedUpdates are empty
  • Using mapped values for the Columns of NetAmount and VATAmount with the calculation based on the values of Amount and VATRate -> if the VATRate get's changed, the two mapped cells are not update/recalculated.

I'm feeling that this should be easy, but I'm out of answers..

Hello jeeryfromsmpl, I think your question looks better suited for our support chat than our community forum. Can you email us at support@retool.com or write to us in the in-app chat feature, and perhaps attach some screenshots of your update queries and change handlers that will help us understand the relationships between your columns and which logic is maintaining their calculations? Thanks!\