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
Unanswered

QR Code Scanning

(0) ShareShare
ReportReport
Posted on by 4

Hey, I am trying to add the QR Scan/Barcode Scanner into the Powerapp. So I have created a powerapp for ipads/mobiles. Screenshot 2023-12-16 at 00.24.13.png

So on the left container are the Titles and on the right containers are the details of those titles and each titles have a Unique UID that under the right containers.

Now I want to add Barcode scanner, so if a user scan the barcode, it should navigate to the corresponding detailed in the Right container screen. I have been going through several materials but I am not able to find a solution. Would anyone help me with it. 

Categories:
  • Horatio Profile Picture
    26 on at

    Guten tag @aamruth 

     

    Here is what I suggest : 

     

    • If not already done, associate a QR Code to every record you have. If you're using a SharePoint list, create a new Text column dedicated to the QR Code value (we'll name it QRCodeValue for example) and associate a unique one with each of your records. Little tip, you can use this link and change "record1" to visualize the QR code you will be associating : 

     

    https://quickchart.io/qr?text=record1

     

     

    • In your Scan button, go to OnScan property and type this : 

     

    Collect(barCodes,BarcodeReader1.Barcodes)

     

    • In your gallery on the left side, add this formula in the Items property :

    If(IsEmpty(barCodes),'YourDataSourceName',Filter('YourDataSourceName',QRCodeValue in FirstN(barCodes,CountRows(barCodes)).Value))

    Now you can try to scan a QR Code matching one you added in an item and see if it's working. Let me know if that's the case and accept it as a solution if that helped  😉

     

    (Last tip but not least, if you'd like people to reset the filter, add a little Cancel Icon somewhere with the following code in its OnSelect property : 

    Clear(barCodes)

    _______

    If this post helps, then please consider Accept it as the solution to help the other members find it. 😎

  • aamruth Profile Picture
    4 on at

    @Horatio Thank you!, it dint work. I already have a formula for item for the left galary view:

     Search([@Notstrategien], SearchInput1.Text, "Title", "Title")

     

    Screenshot 2023-12-17 at 01.27.36.png

     

    QR code is an additional feature, I want to add in the app, so after scanning, it should navigate to the corresponding detailed page. I have a column in the Sharepoint list by name UID. Its a unique ID and also a QR code value.

     

     

  • Horatio Profile Picture
    26 on at

    @aamruth Oh ok I thought your form on the right was on the same screen for mobile too.

     

    No problem, maybe you can try something like this in your OnScan property:

     

    Set(varUID,Blank());ClearCollect(barCodes,BarcodeReader1.Barcodes);Set(varUID,LookUp(Notstrategien,ColumnWithQRCodeValue exactin FirstN(barCodes,CountRows(barCodes)). Value).ColumnWithQRCodeValue);If(!IsBlank(varUID),Navigate(ScreenWithYourForm,ScreenTransition.Cover),Notify("No record found with this QR Code",NotificationType.Error))
    

     

    1- Initialize Variable:

    Set(varUID, Blank());: Initializes a variable named varUID with an empty value.

     

    2-Scan Barcodes:

    ClearCollect(barCodes, BarcodeReader1.Barcodes);: Collects scanned barcode values into a collection named barCodes.

     

    3- Lookup Record:

    Set(varUID, LookUp(Notstrategien, ColumnWithQRCodeValue exactin FirstN(barCodes, CountRows(barCodes)).Value).ColumnWithQRCodeValue);: Looks up a record in the Notstrategien data source based on scanned barcodes and sets varUID to the corresponding value in the ColumnWithQRCodeValue column.

     

    4- Conditional Navigation:

    If(!IsBlank(varUID), Navigate(ScreenWithYourForm, ScreenTransition.Cover), Notify("No record found with this QR Code", NotificationType.Error)): Navigates to a specific screen if varUID is not blank; otherwise, displays an error notification.

     

    And in your form, go to its Item property and add :

    LookUp(Notstrategien,ColumnWithQRCodeValue = varUID)

     

    You may need to experiment to overcome some problems, but I hope this is a good starting point. 😉

     

    Note : my formula works if you only scan ONE QR Code but I think this is what you were going to do. 

     

    _______

    If this post helps, then please consider Accept it as the solution to help the other members find it. 😎

    www.tutoverse.substack.com

  • aamruth Profile Picture
    4 on at

    Thank you @Horatio . Unfortunately dint work and kind of broke my previous application set and had to redo the app again to previous working version. The Scan of QR code is navigating to RightContainer1. So the application would look on pad and phone as here. So can scan the QR code via both pad and phone and that navigates to corresponding details container.  Screenshot 2023-12-17 at 21.41.15.pngScreenshot 2023-12-17 at 21.42.02.pngScreenshot 2023-12-17 at 21.42.43.png

     

    I used this formula for OnScan:

    Set(varUID,Blank());ClearCollect(barCodes,BarcodeReader1.Barcodes);Set(varUID,LookUp(Notstrategien,UID exactin FirstN(barCodes,CountRows(barCodes)). Value).UID);If(!IsBlank(varUID),Navigate(RightContainer1,ScreenTransition.Cover),Notify("No record found with this QR Code",NotificationType.Error))

     

    Under Form property item its: RecordsGallery1.Selected

     

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

#2
WarrenBelz Profile Picture

WarrenBelz 207 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 169

Last 30 days Overall leaderboard