web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Text + Barcode Reader ...
Power Apps
Unanswered

Text + Barcode Reader search

(0) ShareShare
ReportReport
Posted on by 19

Hi all, 

 

So I am currently working on an ICT Asset register for our organisation and want to see if it is possible to filter down a Gallery based on both Single Line search and Barcode Reader Search. 


Currently, the single-line search is working fine (see code below)

 

SortByColumns (
 Filter (
 [@'ICT Assest Manager'],
 StartsWith (
 Title,
 TextSearchBox1.Text
 )
 ),
 "Title",
 If (
 SortDescending1,
 SortOrder.Descending,
 SortOrder.Ascending
 )
)

 

I then attempted to update the code to pull the data from the barcode reader scan. (included below)

 

SortByColumns(
 Filter(
 [@'ICT Asset Manager'],
 Or(
 StartsWith(Title, TextSearchBox1.Text),
 Title = BarcodeScanner1.Value
 )
 ),
 "Title",
 If(SortDescending1, SortOrder.Descending, SortOrder.Ascending)
)

 

Alternatively, I also tried using the barcode scan to fill in the data to the search field but came again came across the same issue 

 

TextSearchBox1 = BarcodeReader1.Value 

 

Unfortunately, I am coming across an error with BarcodeScanner1.Value as shown in the screenshots attached. Has anyone else managed to successfully carry this out?

 

For context I am using SharePoint Lists as my backend for Power Apps.

 

(p.s. I just realized the spelling mistake with the table name so I've gone ahead and fixed it!)

 

Thanks,
Matthew

Screenshot 2024-04-15 153349.png
Categories:
  • WarrenBelz Profile Picture
    156,748 Most Valuable Professional on at

    Hi @mmcgookin ,

    Assuming you are using the Barcode Reader (current control)

    SortByColumns(
     Filter(
     [@'ICT Asset Manager'],
     Or(
     StartsWith(
     Title, 
     TextSearchBox1.Text
     ),
     Title = First(BarcodeReader1.Barcodes).Value
     )
     ),
     "Title",
     If(
     SortDescending1, 
     SortOrder.Descending, 
     SortOrder.Ascending
     )
    )

     

    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

  • mmcgookin Profile Picture
    19 on at

    Hi Warren,

     

    I appreciate you getting back to me on this. So I added the code and no errors on my end so a massive thank you for providing this! However, I have tested this on power apps mobile and it doesn't seem to be filtering down the gallery. 

    I've attached a GIF showing the barcode scanner functionality not working when scanning a QR code (text: - SUR100) and then the single-line search working as expected. I am wondering if it would be better if I used the Barcode Reader on-scan to fill the data into the search bar. Not entirely sure of the exact code that would need to be added for this but would love any feedback you may have on this!

     

    Thanks,
    Matthew

     

    MicrosoftTeams-video (3) (1).gif

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.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 339 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 289

#3
Mohsin Ali Profile Picture

Mohsin Ali 228

Last 30 days Overall leaderboard