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 / Barcode scanner to dis...
Power Apps
Answered

Barcode scanner to display new screen

(0) ShareShare
ReportReport
Posted on by 453

Hello!

 

I have 6 QR codes created and stored on a SharePoint list and I want each QR code, once scanned, to display a different screen on the app.

 

For example, I select the Scan button, I scan QRCode1 and then Screen1 displays etc...

 

Is there any simple way of doing this? 

 

Any help appreciated 😄

 

Thanks,

Josh

Categories:
I have the same question (0)
  • Verified answer
    mmollet Profile Picture
    3,187 on at

    You could use a switch statement:

    Switch(scanneroutput, barcodestring1, navigate(screen1), barcodestring2, navigate(screen2), etc...)

     

    For example if your barcodes resolve to the strings "new user","lookup user","delete user","get help", etc

    Switch(YourScannedValue, "new user", Naviaget(NewUserScreen), "lookup user", Navigate(LookupUserScreen), etc)

  • Jap11 Profile Picture
    453 on at

    @mmollet Ah great, thanks for the help. How would I get the barcodes to resolve to certain strings? Like with your examples provided?

     

    thanks again

  • mmollet Profile Picture
    3,187 on at

    So all barcodes generally resolve to a string of some type. In Power Apps you can use the dot operator to access the fields available for the scanner. The one you want is ScannerName.Value. This will be of type string and will be the string representation of the barcode that was scanned. (if you want a number then use Value(ScannerName.Value) to cast the string to back into an integer which can then be used for math operations or comparisons to other integers)

     

    You can go online to a barcode generator for example and type in your name, hit generate, and then a barcode/qr code will pop up. We are doing the opposite when we scan a code. We start with the barcode and are interested in getting the string it represents. This can then be compared to something or stored in our Apps. If you had a text box that was set to BarcodeName.Value and you scanned the barcode in my scenario in the paragraph, the textbox would have your name in it after the scan was completed. 

     

    Hope this helps!

  • Jap11 Profile Picture
    453 on at

    I think this makes sense! So if I go to a site and generate a QR code and the text that I entered is StallOne, would the Switch statement look as follows:

     

    Switch(YourScannedValue, "StallOne", Navigate(StallOneScreen)

     

    EDIT: I tried this however it doesn't seem to work, so I'm not sure I've understood this correctly. Any help would be appreciated 🙂

    JoshPullan11_0-1678267834743.png

     

     

     

  • Jap11 Profile Picture
    453 on at

    I think I've got it to work 🙂

     

    Switch(BarcodeScanner1.Value, "StallOne", Navigate(Stall1), "StallTwo", Navigate(Stall2))

     

    Really grateful for your help 🙂

  • mmollet Profile Picture
    3,187 on at

    No problem glad I could help! Not sure if you have ever programmed but if you have you can think of the BarcodeScanner control as an object that has its own properties one of which is the value it scanned. That value is stored in its property called Value and is access by using the dot operator on the object. This will be the case for all controls in Power Apps as well. 

     

    TextInput is the control and TextInput.Text is the text it holds

    Dropdown is the control and Dropdown.Selected is the row/object that was selected from the dropdown and Dropdown.Selected.FirstName would be the first name of the row/object that was selected in the control for example.

     

    Can get confusing sometimes but is super important! Good luck Power Apping!

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 392 Most Valuable Professional

#2
11manish Profile Picture

11manish 181 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 112 Super User 2026 Season 2

Last 30 days Overall leaderboard