We use this Query. UPDATE students set certificate_status = "ACCEPTED"
where id = {{ table3.selectedRow.id }}
But the changes made in Retool are not being stored our database. Do we need to develop additional API to save the data in our database?
We use this Query. UPDATE students set certificate_status = "ACCEPTED"
where id = {{ table3.selectedRow.id }}
But the changes made in Retool are not being stored our database. Do we need to develop additional API to save the data in our database?
Hello @Seong and welcome to the forums!
I'd need to see a bit more about the design/UI for your table and functionality but if you are doing something like selecting a row from the table and then clicking a button to "update" the certificate_status you would need to make sure that the button is setup to trigger the query using the button's event handlers.
If you want a more seamless table experience, you can directly create this button as a row action on your table, which will be visible when a user's mouse is hovering over the row. Just like before, the row action's button event handler needs to trigger your update query.
Hello @Seong!
Pyrrho covered a lot of great points on double checking if the Query is set up correctly.
What action are you using to trigger this query?
Are you sure you selected a row in the table before running the query, so that {{ table3.selectedRow.id }} has a value assigned to it?
If you check the apps state after you click a row, does table3.selectedRow show up with a value assigned to it?
If you run the query with a int/number value hard coded into it, does that change save to the database?
Can you share a screenshot of the query?