I was wondering what people thought about just calculating the columns using SQL as you're loading the data (I'm more comfortable with SQL at this point).
Is there a benefit to doing it one way vs. the other?
I would lean toward doing it on the server vs locally. It will nearly always be more performant. Retool is a bit of a laggard, so almost anything that speeds it up is good even if it is a little more work.
Do it locally if:
It will not be more performant on the server for some reason (overloaded server for instance)
The value depends on some other value or state not known to the server.
If you are doing updates on the table and you don't want/like the extra code required to exclude those properties from the .recordUpdates object within your bulk update query: {{tblProducts.recordUpdates.map(row => _.omit(row, ["totals"]))}}