Announcements
Hello,
I'm trying to use the new Barcode Reader to output the scan to a text box.
I have tried following the solution here but i can't get it to work https://powerusers.microsoft.com/t5/Building-Power-Apps/Barcode-Reader-no-output-value-to-text-box/m-p/2092469#M522995
If someone could kindly share how I can click scan, then the barcode scanned to appear in the text box.
Thanks
Hello, @jap11 , the barcode scanner control has a property called OnScan, use this formula in there:
Set(glbVarScan, BarcodeReader1.Barcodes)
Then your your Label Text property, put the glbVarScan
I am primarily available on weekdays from 6-10 PM CT and 5-10 PM CT on weekends.
Visit my Blog: www.powerplatformplace.com
Hello @AhmedSalih - thanks for responding!
I'm still getting an error message when trying this?
Is there still something I'm doing wrong?
@jap11, is this a Teams PowerApp?
@jap11, use this in the Text property: First(glbVarScan).Value
@AhmedSalih thank you, that's worked!
@jap11, Glad it did 🙂
@AhmedSalih Apologies - one thing I've noticed is that if i scan a barcode and it outputs to the text box, if i leave the screen and return back, the last scanned code still appears.
Is there anyway to reset this so the field is empty again if i leave the screen.
@jap11, try to use the Last function instead of the First: Last(glbVarScan).Value
@AhmedSalih unfortunately it still displays the last scanned value.
@jap11
, after I gave it a thought, and with the new way yhat barcode control now works, you will need to use collection: In the OnScan: Collect( colScannedItems, {ScannedItem: First(BarcodeReader1.Barcodes).Value, ScannedTime: Now()} )
In the Text: First(SortByColumns(colScannedItems,"ScannedTime",SortOrder.Descending)).ScannedItem
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
WarrenBelz 356 Most Valuable Professional
11manish 225 Super User 2026 Season 2
Mohsin Ali 211