Hello all! I built an app to map products; basically it add new rows to an existing table to create 1:1 relationships between two different objects. I created unique id's for each row of this table by adding a dynamic column (a column calculated from other columns). My problem is that I don't know how to add this row's unique ids as new rows are added through the app. So:
- Is there a simple way to add unique Id's to new rows in Retool using a writeback SQL query?
- Has anyone written an INSERT INTO statement with a combination of items and a calculated column? I imagine it would look something like this:
"INSERT INTO name_of_table (product, number, menu_type, size, comp_name,
comp_product_name, comp_number, comp_size, row_id AS number || comp_number)
VALUES ({{select1.selectedItem.PRODUCT_NAME}}, {{parseInt(select2.value)}},
{{select3.value}}, {{select4.value}}, {{select5.value}},
{{select6.selectedItem.PRODUCT}}, {{parseInt(select7.value)}}, {{select9.value}}); - If the previous two options are not possible, is there a way to trigger a second process to run at the same time as the writeback query is triggered? Meaning: As the user inserts a new row another query would be triggered with an UPDATE statement.