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 / Filter on second galle...
Power Apps
Answered

Filter on second gallery from selection on first gallery not displaying data correctly

(0) ShareShare
ReportReport
Posted on by 6

I'm sorry in advance if this is covered in another post, I did my best to see if I could find it addressed anywhere else! And thanks for any time you take looking at my problem, I really appreciate it.

 

I have a Canvas app based on 2 SharePoint lists - the first is a list of schools with basic information about them, the second is a list of visits to those schools. My end goal is for colleagues to be able to find the school they're interested in on the first screen of the app, which can take them to a second screen that shows them just the visits for that school. They can then navigate back to the first screen to check other schools.

 

This is the first screen (School screen) for my app, which works correctly.

AndyPestell_0-1718720845683.png

If I click on the 'Visits' button on the first screen, it takes me to the second screen (Visits screen), displaying only the visit for Archbishop Runcie school, which is correct, along with the school's name suffixed by " Visits". So far, so good.

AndyPestell_1-1718723930879.png

Next I navigate back to the Schools screen by selecting the back navigation button on the top left corner and select another school:

AndyPestell_2-1718724088683.png

 

But when I select 'Visits' for this school, I get a 'No item to display' message on the cards, even though it's correctly showing a visit on the left gallery. It also excludes the school's name on the header.

AndyPestell_3-1718724162864.png

 

I'm sure it's something to do with the gallery selection, since if I click 'Visits' on another school on the School Screen first, it will display their visit(s) correctly as above, and then Archbishop Runcie's visits won't display properly.

 

Thanks for your help, any advice massively appreciated.

 

Andy

Categories:
I have the same question (0)
  • mpistil Profile Picture
    on at

    Hey @AndyPestell 

     

    Can you provide screenshots of the OnSelect of the back button as well as the visits button? My initial thought is maybe the back button isn't truly clearing out the previous selection --  since you can access this app for the first time, and it works well, but when you go to do a secondary search, it's erroring.

  • Verified answer
    WarrenBelz Profile Picture
    154,494 Most Valuable Professional on at

    Hi @AndyPestell ,

    If you use a Variable OnSelect of the Gallery 

    Set(
     gblRecord,
     ThisItem
    )

    and then on the Item of your Form

    LookUp(
     YourSPListName,
     ID = gblRecord.ID
    )

    you should always display the current record selected.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

     

  • AndyPestell Profile Picture
    6 on at

    Hi @mpistil,

     

    Thanks for replying - your initial thought sounds like you're onto something! Here's a screen shot of the back button:

    AndyPestell_0-1718826281181.png

    And the 'Visits' button: 

    AndyPestell_1-1718826343136.png

    Cheers,

     

    Andy

  • AndyPestell Profile Picture
    6 on at

    Cheers @WarrenBelz

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
WarrenBelz Profile Picture

WarrenBelz 549 Most Valuable Professional

#2
Kalathiya Profile Picture

Kalathiya 225 Super User 2026 Season 1

#3
Haque Profile Picture

Haque 224

Last 30 days Overall leaderboard