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 not re...
Power Apps
Answered

Barcode scanner not returning correct results

(0) ShareShare
ReportReport
Posted on by 16

I have a barcode scanner button connected to a sharepoint list. I have a home, browse, detail, and edit screen. I have no issues with the browse, detail, and edit screens when navigating the app. The barcode scans fine, but it takes me to the detail form of the most recent item that was accessed and not the one that was scanned. I have looked through a lot of tutorials and videos and can't get it to work correctly. I know my issues is with the commands not connecting from each screen, but I just can't get it to work. Any help is appreciated.

 

Here are the formulas I have currently, as I undid everything and started back fresh:

Home Screen - OnScan: LookUp('Master List','Barcode Number'=BarcodeScanner1.Value); Navigate(DetailForm1,ScreenTransition.Fade)

  • In my sharepoint list the 'Barcode Number' column is formatted as a number if that matters.

Browse Screen - NextArrow1: Select(Parent)

Detail Form 1 - Item: BrowseGallery1.Selected

Edit Form 1 - OnSuccess: Back()

 

 

 

 

Categories:
  • Rusk Profile Picture
    1,369 Super User 2024 Season 1 on at

    Hi @kholden 

     

    You mentioned that the scan takes you to the Detail Form screen of the wrong item.  The Items for this form is BrowseGallery1.Selected.

     

    How are you selecting items in BrowseGallery1?

  • kholden Profile Picture
    16 on at

    @Rusk 

     

    In browse gallery OnSelect has this formula: Navigate(DetailScreen1, ScreenTransition.None)

  • Rusk Profile Picture
    1,369 Super User 2024 Season 1 on at

    So it seems that from the Home screen, the user scans the barcode.  This navigates them to the form.  But how do you select the newly scanned item in the gallery?  This could be the issue.  Or do you have something in place to select this newly scanned item in BrowseGallery?

  • kholden Profile Picture
    16 on at

    @Rusk 

    The goal is for them to scan the barcode and it takes them directly to the detail screen/form so they can see the information and edit if needed. It does scan correctly and take them to a form, but it takes them to whatever the last accessed item was before that. So it never takes them to what is scanned. I don't have anything in place for them to select the newly scanned item in Browse Gallery. That might be a better idea though.

     

    I want them to be able to scan, take them to the entry, view information and edit if needed. But, also would like for them to be able to go to the gallery and select an item there if needed.

  • Rusk Profile Picture
    1,369 Super User 2024 Season 1 on at

    I believe the problem is:  The form is linked to what is selected in the gallery, but the scanner takes them to the form and skips the gallery.  So the wrong item is selected, and the wrong item is in the form.

     

    To be able to do both, you could use a variable to determine what to show in the form.  Set this variable when scanning OR when selecting an item in the gallery.

  • kholden Profile Picture
    16 on at

    Thank you. I will give that a try.

  • Rusk Profile Picture
    1,369 Super User 2024 Season 1 on at

    Here's an example:

     

    Home OnScan

     

    Set(varFormNav(LookUp('Master List','Barcode Number'=BarcodeScanner1.Value,'Barcode Number');
    Navigate(DetailForm1,ScreenTransition.Fade)

     

     

    Gallery OnSelect

     

    Set(varFormNav,BrowseGallery1.Selected.'Barcode Number');
    Navigate(DetailScreen1, ScreenTransition.None)

     

     

    Form Item

     

    LookUp('Master List','Barcode Number'= varFormNav)

     

  • Verified answer
    kholden Profile Picture
    16 on at

    I have not found a solution, but I am taking a different route so I will close this thread.

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

#2
WarrenBelz Profile Picture

WarrenBelz 188 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 130

Last 30 days Overall leaderboard