Announcements
Hi,
I have a barcode reader control in a gallery. The issue I am facing is the OnScan() function is not getting triggered even after I am scanning a code. The same code is scannable in other places in app, but on the gallery its not working. OnChange() fuction is triggered but the Barcodes table is returned as empty.
Any idea why
Thanks
Hi @hiranes ,
I do not believe the control was designed to have multiple instances like this. If you put it outside the gallery, you can still refer to the record elements selected in the gallery for reading/writing data.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
MVP (Business Applications) Visit my blog Practical Power Apps
Thank you. But the problem is that I am using the barcode scanner to fill up some of the text boxes. Not all rows textboxes have the scanner. To achieve this how to design the page with gallery? As you can see the row in which the scanner comes is depend on the data. So I cant predict that.
@hiranes ,
Firstly there are (mostly rare) times when something just is not possible to do in the manner you want and this may be one of them. As I mentioned before, a control outside the gallery can still refer to fields in the selected gallery record and in your case, the Visible of the scan button could be based on the value in the relevant field/s in the selected. Gallery record.
Would this work for you ?
@WarrenBelz Unfortunately No. There can be multiple textboxes with Scan property assigned. So a single scan button will not do. The scanned data need to be populated to the associated textbox.
I cannot test this without building a model, however the outcome you are getting does not surprise me. There are no settings that I know of that you can change in either the gallery or the scanner, so I really cannot offer any other suggestions than I have currently.
Thank you for the insight and help @WarrenBelz. I shall explore other ways to design this page then.
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 358 Most Valuable Professional
11manish 207 Super User 2026 Season 2
MS.Ragavendar 150 Super User 2026 Season 2