[Automation] Possible bug: cannot update table after querying it #15300
-
Hi, I've done more testing and I think I found a bug. Here is how to reproduce:
Below is the original post: I have a simple app set up. I have 2 tables "signups" and "discountCodes". The idea is when there is a new sign up, I query the discountCodes table and get a discount code that hasn't been assigned. Then, I update the new signup row's discountCode with the fetched code from the discountCodes table. Everything works until here. Next, I want to update the discountCodes table and set the discountCode to Assigned (boolean value). This last step fails with "Row does not exist". Am I missing something? Budibase version: 3.2.32 (self hosted) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Hey @MrT3chGuy - I think there's some confusion here between the row_id and the auto_id. Head to the Data tab, and right-click on the row you plan to update with this automation. You'll find that the row_id actually looks something like ro_ta_b1ea879f4d794e37b6597bf011ef1fe5_ff1516c4339343d2850d4e04b6efcce2 We can also see this in filtering, where we have the auto-incrementing column that I named Whenever you're planning to update a row, you'll need the _id, rather that it's auto_id. I think looking at your screenshots, the fix might simply be to prepend an underscore to "id" in your handlebar bindings, where you use something like |
Beta Was this translation helpful? Give feedback.
Hey @MrT3chGuy - I think there's some confusion here between the row_id and the auto_id.
Head to the Data tab, and right-click on the row you plan to update with this automation. You'll find that the row_id actually looks something like ro_ta_b1ea879f4d794e37b6597bf011ef1fe5_ff1516c4339343d2850d4e04b6efcce2
We can also see this in filtering, where we have the auto-incrementing column that I named
auto_id
(I think yours is namedid
, but we also have the option for _id)Whenever you're planning to update a row, you'll need the _id, rather that it's auto_id. I think looking at your screenshots, the fix might simply be to prepend an underscore to "id" in your handlebar bindings, where you u…