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 / Filter combo box using...
Power Apps
Unanswered

Filter combo box using a barcode scanner value

(0) ShareShare
ReportReport
Posted on by 12

I have a canvas app connected to dataverse tables.

In an editform screen I have a combo box displaying the values from a lookup column in a dataverse table.  I want to use a barcode scanner button so that the user can scan a QR code and the output from the scan is used to filter the combo box.

 

Currently I have been able to filter the combo box with the following:

DefaultSelectedItems = Filter(Choices([@'Production Registers'].crf50_Item_id),PlainText(ThisRecord.'Item ID') = "ITEM-000054")

 

And when the form is submitted it then correctly submits ITEM-000054 as the 'Item ID' in the dataverse table.

However I need the value to come from the Barcode scanner.

 

I've unsuccessfully tried:

  1. DefaultSelectedItems = Filter(Choices([@'Production Registers'].crf50_Item_id),PlainText(ThisRecord.'Item ID') = BarcodeScanner1.Value)
  2. Adding in a text label (ScannedItemIDText) which contains the Barcode scanner output and then using it in the following: Filter(Choices([@'Production Registers'].crf50_Item_id),PlainText(ThisRecord.'Item ID') = ScannedItemIDText.text)

 

 

Categories:
  • Kosenurm Profile Picture
    802 on at

    To use the output from the barcode scanner to filter the combo box, you can use the OnSelect property of the barcode scanner button to set the DefaultSelectedItems property of the combo box.

    Here is an example of how you can do this:

    1. Add a barcode scanner button to your app and set its OnSelect property to a formula that captures the scanned value. For example:
    OnSelect = Set(scannedValue, BarcodeScanner1.Value)
    1. Set the DefaultSelectedItems property of the combo box to a formula that filters the choices based on the scanned value. For example:
    DefaultSelectedItems = Filter(Choices([@'Production Registers'].crf50_Item_id), PlainText(ThisRecord.'Item ID') = scannedValue)

    This will set the selected item in the combo box to the item that has an 'Item ID' that matches the scanned value.

  • workingonit Profile Picture
    12 on at

    Thanks @Kosenurm. That is what I had done.

    I've tried it again using your example and it still doesn't filter the combo box. But the barcode scanner is correctly outputting what is scanned to my Text label (I was using the text label to check that the barcode scan worked).
    Do you have any other ideas to trouble shoot?

  • workingonit Profile Picture
    12 on at

    I feel like it must be an issue with the actual combo box.

    Because I've created another screen with a datatable and used the same filter, with a barcode scanner and text label to display (as a double check during development) what is scanned, and it correctly displays a record from the table that has the matching Item ID. I've attached a screen shot of the successful screen as viewed on my phone and also on the laptop. Unsure where it could be going wrong on the combo box...

    Filter dataverse table.jpg
    Screenshot_20230105-231447_Power Apps[35850].jpg
  • workingonit Profile Picture
    12 on at

    Still trying to find a solution if there is anyone out there to assist. This has me stumped.

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

#2
M Bilal Khan Profile Picture

M Bilal Khan 318

#3
Mohsin Ali Profile Picture

Mohsin Ali 220

Last 30 days Overall leaderboard