Hi everyone,
I’m building a mobile inventory management app in Retool, and I’m having trouble with the editItemScreen. I want to allow users to edit product details like nombre, categoria, cantidad, etc., but keep the id fixed and use it to locate the correct item in the database.
The problem: the updates don’t persist. I fill out the form, submit, and everything seems to work—no errors—but the changes aren’t reflected in the database.
What I’ve done:
- The form is pre-filled using itemCollection.selectedItem.
- I use a SQL UPDATE query on the productos table with a WHERE id = {{ itemCollection.selectedItem.id }} clause.
- Fields like costo, precio, and cantidad are bound to inputs like costoInput2.value, precioInput2.value, etc.
- The query runs without error, and getItems is triggered afterward to refresh the data.
- I’m using GUI mode for the query with the proper changeset.
Still, no updates are saved.
I’m attaching the app JSON so you can take a look. Maybe I’m missing something simple?
Thanks in advance for any help!
Inventario Farmasi.json (70.8 KB)