Error Handling: Inserts into DB tables

Hello :slight_smile:

Check this thread, I was fighting with something similar and the solution is to make things as a single transaction. So if one fails, all fail. (normal world, which Retool is not)

Unfortunately, the only way to do that is with stored procedures.

Then for it to be able to be used with dynamic variables (like your text boxes) is to prep the entry payload in a JS query, and pass that as an argument to your stored proc. At least I'm doing that and it works.

Transactions with multiple queries, inserts and updates are a basic thing for many business purposes like yours and mine, no idea why Retool hasn't implemented anything to enable them yet. I guess if we all put our +1 in the queue, the feature would get a priority bump

1 Like