Help assigning scanned barcode to codigo_de_barras in editItemScreen

Hi everyone,

I’m working on a mobile Retool app for inventory management, and I’m trying to automatically assign the scanned barcode value to the codigo_de_barras field of the item being edited.

Here's what I need:

  • When the barcode scanner on the editItemScreen is used,
  • I want the result (i.e. scanner1.data or equivalent) to be assigned directly to the codigo_de_barras value of the current item.

I already have the scanner configured and working — it captures and navigates properly. But I can't figure out how to bind or set the scanned value into the codigo_de_barras input field on that screen.

Any ideas on the best way to do this in Retool Mobile?

Thanks in advance!

Inventario Farmasi.json (73.3 KB)

Hi @max.lopezzz,

Thanks for reaching out.

I took a look at the app json. It looks like the scanner is on the inventoryscreen, and I can't find the codigo_de_barras input.

That said, as long as the scanner1.data is in the state, you can use an event handler like this:

You cannot assign one scanner value to another scanner component.

Let me know if you're still working on this! Happy to take another look

I haven't been able to figure it out; I'm still pretty much stuck just where I started :frowning:

Thanks for letting me know! Could you share more information about what you're looking to accomplish? I couldn't find the codigo_de_barras input.