What is the best way to avoid re-running a query after only a minor change on the data (e.g. status change)?

Hi Retool community! :wink: What I would like to achieve is going through a returned data set (from a query) one by one with the purpose of verifying the data. For each (unverified) element from the result the user will click a button and update the underlying table (status to verified). Ideally we now move to the next item.

Currently I re-run the initial query to get a fresh list of un-verified items. But ideally I get all items and keep track of verified items locally so I don't need to re-run the query every time. What is the best way to achieve this in Retool? I'm new in using Retool so any push in the right direction is much appreciated! :slight_smile:

You can use temporary state variable set to the original data set and alter the values in there as needed and then update your db when all items are verified. But this works only for the session you are in.

@ScottR Thanks for the tip, this sounds like the way to go :). Will read the details here and test it.

@Mik Also, check out this post: It has helped me in the past as well...