Why isn't my item editing screen working?

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)

Hello @max.lopezzz ,

It looks like the wrong query might be triggered on formButton2. Currently, it's running the getItems query, but it should be executing the addItem query to add the product to the database.

I tested it on my mobile app, and everything is working correctly — the product is successfully added to the database. Please see the attached screenshot as an example.

Let me know if you'd like help updating the query configuration.