debuggingpowerappspowerapps-canvaspowerapps-formulapower-platform

Power apps cannot use barcode scanner function


I have tried using barcode scanner in power apps to store barcodes in a collection. I used this following formula onScan

Collect(colBarcodes,Self.Barcodes)

Then, I show the collection in a gallery by defining "colBarcodes" in the gallery item and set a formula to a text label in the gallery

Thisitem.Value

It used to be worked (I start implementing this code since last year) and work correctly until now (21/02/2025) that I found the barcode scanner didn't work anymore. It show that Self.Barcodes is error from

JSON paring error. expected 'object' but got 'array'

Also, the gallery didn't display barcode correctly. It show error that

Name isn't valid. 'Value' isn't recognized

I try using the following formula onScan

Collect(colBarcodes,{Barcode : BarcodeReader1.Barcodes})

and set the text label formula

Thisitem.Barcode

But, it still didn't work. I need it to be able to collect barcodes and show in a gallery once again. Can someone help me solve this issue please ToT


Solution

  • This is a known issue - see https://admin.powerplatform.microsoft.com/support/knownissues/4665641. The fix should come in a couple of days, and the document lists a mitigation (you can go back to a previous version of the Power Apps canvas studio)