QR/Barcode Scanner With Built-In Scanner (Not Camera)

Hello all,

I am currently working on something to capture qr codes by using a device that has a built-in 2d imager. Basically it has a built-in red light scanner activated by a button on the side of the device. We will use this in an outside environment to scan various QR codes. Sunlight and glares will be a major factor hence why I'd rather not use the camera. Also, the built-in scanner is a lot quicker and can scan from a pretty good distance. Is there a way to activate or use a built-in scanner instead of the camera for a QR code/barcode?

Thanks,

-Jonathan

Hi @Bricbasher,

If I'm understanding your question correctly, we do something similar to this on a couple of our iPad applications. We have a Bluetooth scanner that is paired with the iPads and can rapidly scan barcodes and create a list in Retool Mobile. We fill a text area component with the barcode values, and then parse the list with JavaScript after we're done scanning the batch of barcodes. Basically the barcode scanner acts as a text input device, and you just need to make sure you have the correct field selected before starting to scan the barcodes.
Would your device work the same way?

Matt,

Thanks for the reply. So yes, it would work the same way as a text input device however we currently have an app we use that fills in the blanks without selecting the corresponding field; the app also seems to know where the appropriate information should go (when multiple input fields are on the screen).

I was hoping to create something similar without having to select the correct field. I'm just curious how that works and what I could do to make it work for my own app.

Let's say I have three text input fields, preferably they would be drop down menus. Each has a specific set of values that can go there based on information from a table. I'd like the app to know when scanning the QR code what goes where. Almost as if it runs through the predetermined values of each table that's associated with the three drop down boxes and fills in where it finds a match.

I'm just unsure how to do that or a direction to start in.

Thanks!

-Jonathan

Are you just trying to find a table row based on the barcode input and then set the value of the dropdowns based on that table row?

Yes! Sorry, I'm very new to this and still learning so I may not have explained very well.

Thanks!

No problem! I think that's fairly simple.

Your barcode input field will have a change handler that triggers a JS query to select the correct row in the table, based on the index of the data that matches your barcode value. Then your dropdowns will have their default value set to the corresponding table column for the selected row.

Incrementing the number input here causes a row change and a subsequent updating of the other components.

This is great information, thank you. I will test this and see what I can do. Thank you again!

1 Like

No problem! Best of luck. I also realized that there's a simpler way to handle the row selection in that number input.

As long as your table has the barcode input field set as the primary key you can just set this up within the change handler and skip the manual code to select the row.