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 / Navigate to selected I...
Power Apps
Answered

Navigate to selected Item OR Scanned Barcode Item.

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi Everyone,

This is my first post on this community so very excited about it and hope you can assist me in the world of Canvas Apps.

I have a screen with a Gallery of product items that contain a unique ID. Now if I tap an item it will navigate to the right product in a new screen with a form Item (Browsegallery1.selected) but I also added a barcode scanner option in the Browser screen. Now when I scan an Item it will just go to the first item in the list and not to the scanned item. I have tried several combinations but I am too unexperienced so far to get it right.

Hope I explained it clear enough and someone can give me a


Categories:
I have the same question (0)
  • Verified answer
    BCBuizer Profile Picture
    22,819 Super User 2026 Season 1 on at

    In your detail screen, instead of using Browsegallery1.selected for Items, use a variable, for instance varItem.

     

    In the Gallery, for OnSelect use something like the below code:

    Set(varItem, ThisItem);
    Navigate(DetailScreen)

     For the Barcode scanner, for OnScan:

    Set(varItem,BarcodeScanner1.Value);
    Navigate(DetailScreen)

     

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks a million for the proposed solution! It seems to be working. I am afraid though that the way I have it now might not be a clean way of how it should be working. I am mainly ofcussing on the Barcode for now by the way. I use varSingleScan (instead of varItem) and it seems to navigate to the right record! Whoop whoop. So thats good, on the other hand if it is an item that is not shown in the Gallery because it is a long list it will not work, but if I have varSingleScan in the default in the searchbox on the screen it will navigate to the right Item, so very happy about that.

    However when I navigate back from the scanned Item to the browsescreen, it shows up blank. So I am missing something there. Do I need to reset something in the searchbox or so?

    Or it could be the back button:

    Navigate(BrowseScreen1; ScreenTransition.None)
    ;;
    Set(VarSingleScan;Blank())

  • Verified answer
    BCBuizer Profile Picture
    22,819 Super User 2026 Season 1 on at

    In the last line instead of setting VarSingle to Blank, use this:

    Set(VarSingleScan;"")

    This makes the variable, and hence the searchbox Empty, rather than Blank.

     

    The Blank is messing up the filter in the Items for the Gallery.

     

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I really appreciate you taking your time @BCBuizer! It worked!

  • BCBuizer Profile Picture
    22,819 Super User 2026 Season 1 on at

    Happy I could be of help and learning something from it in the meantime myself 🙂

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 463

#2
WarrenBelz Profile Picture

WarrenBelz 364 Most Valuable Professional

#3
11manish Profile Picture

11manish 275

Last 30 days Overall leaderboard