
Hello everyone,
I have a task to write simple app, which will work on an industrial long range barcode scanner.
Basically I have few form with text inputs, where the users will scan some barcodes.
I can not use barcode plugin from powerapps, because it uses camera and not the scanner in the device.
My problem is - after the user scan some barcode, the software always ends such scan with a CRLF, so i have 1234567890CRLF.
I want to automatically change a focus to another text input after the user scanned something to a field. I tried to do it with OnChange Event, but it does not work until the focus is lost which is not an option, because it has to be done automatically.
How to do it in powerapps?
Hi @empe2,
Please try this.
1. Set App.OnStart property as follows to create a blank collection with ID, the number of rows is based on number of text inputs
ClearCollect(ColScan,{ID:1,Value:""},{ID:2,Value:""},{ID:3,Value:""});Set(VarID,1)
2. Set BarcodeScanner1.OnScan as follows, save scan value into the collection in turn.
Patch(ColScan,LookUp(ColScan,ID=VarID),{Value:BarcodeScanner1.Value});Set(VarID,VarID+1)
3. Set the 1st Text input.Default property: LookUp(ColScan,ID=1).Value
Set the 2nd Text input.Default property: LookUp(ColScan,ID=2).Value
Set the 3rd Text input.Default property: LookUp(ColScan,ID=3).Value
This works well on my side, please have a try to see if this works for your case.
Sik