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 / Power app barcode scan...
Power Apps
Answered

Power app barcode scanner to verify right item

(0) ShareShare
ReportReport
Posted on by 108

I need to make an app that has a barcode scanner to verify the right item is attached to the right area. My plan is to have everyone open the app, select the area they're in from a drop down menu and scan the barcode to verify that is the right one for that area. I have only 10 possible barcodes but I have more than 30 areas. Some barcodes are assigned to multiple areas. Is there anyway to have the app verify the correct barcode for a given area? And can I have the app alert the user if it is or isn't the right barcode? 

I'm not sure this is even possible but I thought I'd ask. Thank you

Categories:
I have the same question (0)
  • rubin_boer Profile Picture
    4,843 Super User 2024 Season 1 on at

    hi @bobbybob 

     

    Quick answer is yes.

     

    Now to get to it. you will need a reference table to evaluate the scanned code and area to be indeed where you expected it to be. the same evaluation can be used to notify the user visually of the mismatched.

     

    Steps

    1. Your reference Table will have something like a id, area, qrcode for example {id: 0, area: "main warehouse", qrcode: "AJF-VVVT01"}. (If you going to have a small sample like that and it is going to remain static for most of the time you can build that table as part of the onstart event.)
    2.  In your app have a dropdown and set its datasource to the table you created.
    3. Create a variable to store the value of the qr code (varSomeBarCode)

     

    When a user select an area the table also contains the qrcode you expect to see.  When the user scan the qr/barcode value will now be available in the variable. You can compare varSomeBarCode = yourDropdown.select.qrcode and if its false you can let the user know that the barcode is not in the expected area.

     

    Once you start building your app and need some help with the code bits, lets us know.

     

    Hope it helps,

    R

  • bobbybob Profile Picture
    108 on at

    Hello, @rubin_boer 

     

    Ok I have created a list which includes the barcode and location. I've also created in the app a cascading dropdown to populate the barcode based on the location. Now I just need help configuring the formula to identify whether the barcode that was populated is the one scanned. Please and thank you! 

  • Verified answer
    rubin_boer Profile Picture
    4,843 Super User 2024 Season 1 on at

    hi @bobbybob 

     

    Consider this:

    • you have a  Barcode Scanner control: BarcodeScanner1
    • you have a  ComboBox control:  cbSelectBarcCodeLocation
    • you have a label: lblSelectLocationBarCode

    With the barcode scanner control set the  OnScan = Set(varScannedValue, BarcodeScanner1.Value)

    Once you selected the control and scanned you image the value of the code will be stored in the variable varScannedValue.

     

    Now that you have the scanned value you want to check whether the barcode is in the right place.

     

    Assumption:

    You have a table which have a column called location and an associated barcode. something like this

    location   |   barcode

    Place 1     |   123456

    Place 2     |  111111

    Place 3     |  555445

    Place 4     |  123456 

     

    This is as source to a dropdown and the location as the primary text. 

    have the following for cbSelectBarcCodeLocation's:

    Item = yourReferenceTable

    OnChange = Set(varReferencedValue, Self.barcode)

    Once a location is selected the variable will store the associated barcode.

     

    All you have to do now is to compare varScannedValue = varReferencedValue 

     

    If true the barcode is in the right place if false then its not

     

    Hope this helps,

    R

     

     

  • bobbybob Profile Picture
    108 on at

    Hello @rubin_boer 

     

    I set up the location as a dropdown box not a combo box. Will that cause future issues? Can I use your current formulas with a dropdown box instead? 

  • rubin_boer Profile Picture
    4,843 Super User 2024 Season 1 on at

    hi @bobbybob the principle is the same. with the dropdown make sure the value = yourLocation. The OnChange will stay the same with a little change: Set(varReferencedValue, Self.Selected.barcode)

     

    😉

  • bobbybob Profile Picture
    108 on at

    Thank you sooo much for your help @rubin_boer . The only part I'm a little confused on is how do I compare the selected barcode to the scanned barcode?

  • rubin_boer Profile Picture
    4,843 Super User 2024 Season 1 on at

    hi @bobbybob 

     

    Set(varCheckBarcodes, varScannedValue = varReferencedValue )

     

    If varCheckBarcodes = true then they the same.

     

    Regards,

    R

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
Haque Profile Picture

Haque 94

#2
WarrenBelz Profile Picture

WarrenBelz 82 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 38 Super User 2026 Season 1

Last 30 days Overall leaderboard