Hi, I'm new to Retool but can't seem to find an answer on here for something I'm sure is very simple.
I have a table from Google Sheets and am looking to take the contents of a cell of a single selected row, pass that to another query and then return the result back to another cell a different column of the same (selected) row. I have got the first two parts working fine but I can't seem to be able to write back to the selected row.
I have this working but this just writes the contents of 'code' to the column 'coupon' in the next empty row:
For that spreadsheet, do you have a primary key that's unique for each row? I think you want to use the Action Type Update a spreadsheet, assuming you're only wanting to update a single row each time.
Specify your Sheet Name, your unique column, and use the one you have in the screenshot to Update value field. For your unique column/filter by value, you need to use something from your {{ table1.selectedRow.data.your_unique_column }}.
I'm not sure I did exactly what you suggested (!) but it seems to have got me to a solution.
I'm picking up the 'name' in a previous query from the 'selectedRow'. Because I want to insert a value into a cell on the same row, using the Update a Spreadsheet action type, I'm able to filter for that 'name' to find that row.