Hello Retool Community,
I am a newbie and I am experiencing an issue with updating a status column in my database from a Retool table UI. The column is an ENUM
type in the database, and I want to reflect the changes made by a user in the UI immediately in the database when they click "Save."
Here’s the process I’m following:
- User edits the status in a table cell.
- The edited value is supposed to be captured in a variable.
- On clicking "Save," an update query should run to save this new status in the database.
However, I’m running into an issue where the variable is not capturing the edited value, but instead is holding onto the original value from the database.
I've set up an event handler for the table as follows:
- Event: Change cell
- Action: Set variable
- State: (variable to hold the new status)
- Value:
{{ table1.selectedRow.status }}
Unfortunately, this setup seems to capture the original value from the database, not the edited one. I'm not sure if this is the right approach. I appreciate it if you can guide me. Thanks!