Hi Retool team!
I'm using Retool to insert multiple records into two tables (the main table + its bridge table) in Postgres at the same time. Two tables are dependent: when a new record enters the main table and gets its uuid, a new record should also be inserted into the bridge table with its foreign key column referring to the main_table_uuid. I don't want either insert to fail. Either data are entered into both tables or none get inserted.
I've found this post solution: "Using a Postgres insert statement, which returns the id value into another insert statement" applicable.
Below is the workflow I'm thinking of
Any suggestion is appreciated. Thank you!