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 Apps
Answered

Filter Gallery

(0) ShareShare
ReportReport
Posted on by 58

Hi,

 

I am trying to create an app that I can use for customer collections in our store.

 

I have created a barcodescanner

 

OnScan = Set(
varsinglescan, BarcodeScanner1.Value);Navigate(Screen3)

On Screen3 it is a gallery that is connected to the database.

How do I filter the gallery by the barcode scanner value?

 

 

 

 

 

 

Categories:
  • BCBuizer Profile Picture
    22,854 Super User 2026 Season 2 on at

    Hi @NOCPOWER ,

     

    You can set a filter in the Items property of the gallery:

    Filter(YourDataSource, BarCode = varsinglescan)

     

    In the above you'll have to replace "YourDataSource" with the identifier of your data source and "BarCode" with the identifier of the column that should be filtered for.

  • NOCPOWER Profile Picture
    58 on at

    Hi,

    Thank you for your quick reply.

     

    It creates an error. These types cant be compared: Number, Text

     

    How do I convert the data type?

     



  • alaabitar Profile Picture
    1,503 Super User 2024 Season 1 on at

    Hello,

     

    You can use the filter function over your collection. Let's say you have a textbox called txtInput and based on what you type their you want to filter your gallery.

    So the items property of your gallery can look like :

    Filter(your_database, txtInput.Text  = some_column_of_your_database)
    But if you want to link your gallery to your scanned items you would need to change your onscan function to:

    OnScan = Collect(
    _scannedValues, BarcodeScanner1.Value);Navigate(Screen3)

    And your items property of the gallery on screen3 to

    Filter(_scannedValues, txtInput.Text  in Value )

     

    Best regards,

    Alaa

  • Verified answer
    BCBuizer Profile Picture
    22,854 Super User 2026 Season 2 on at

    Hi @NOCPOWER ,

     

    The Value (text to number) or Text (number to text) functions can be used for that. Depending on what your values look like, and what the data type of your column is, you can apply them, but I think the below should work in any scenario:

     

    Filter(YourDataSource, Text(BarCode) = Text(varsinglescan))

     

     

  • NOCPOWER Profile Picture
    58 on at

    Thank you

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 405 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 368

#3
WarrenBelz Profile Picture

WarrenBelz 244 Most Valuable Professional

Last 30 days Overall leaderboard