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?
Would your device work the same way?
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.
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.
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!
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.