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 / Display Gallery items ...
Power Apps
Answered

Display Gallery items based on another collection

(0) ShareShare
ReportReport
Posted on by 217 Season of Giving Solutions 2025
I have 2 SP tables using a canvas app, Person and Products,
I am trying to filter a gallery so the correct person sees the correct products, I'm using User().email to match the email field in the persons table;
 
Persons  
Email Section
jim@test.com Local
Paul@test.com National
jim@test.com International
Paul@test.com USA
Products    
Product Quanity Section
Paper 23 National
Soap 43 Local
Coal 5 International
Napkin 66 National
 
The section names can be changing to all the time so my usual solution of setting a variable for each section doesn't work. 
From these values I would want Jim to login and see Soap and Coal listed in the gallery connected to product table, any help would be appreciated, thank you
 
Categories:
I have the same question (0)
  • Verified answer
    Pstork1 Profile Picture
    69,556 Most Valuable Professional on at
    There is an easy solution if the Products list isn't bigger than 2,000 items.  If it isn't you can use the following filter for the gallery.
     
    Set(CurrentUser, User().Email);
    Filter(Products, Section in Filter(Persons, Email = CurrentUser));
     

    ----------------------------------------------------------------------------------
    If this Post helped you, please click "Does this answer your question" and give it a like to help others in the community find the answer too!

    Paul Papanek Stork, MVP
    Blog: https://www.dontpapanic.com/blog
     
  • Suggested answer
    Kalathiya Profile Picture
    2,456 Super User 2026 Season 1 on at
    Hello @senna
     
    Yes, It's is possible. 
     
    App On Start Property
    ClearCollect(
        colCurrentUserSections,
        Filter(Persons, Email = User().Email)
    );
    
    Returns all sections assigned to the logged-in user and stored in colCurrentUserSections collection.
     
    Gallery Item Property
    Filter(
        Products,
        Section in colCurrentUserSections.Section
    )
    

    This filters the Products list to show only those records whose Section matches any of the sections assigned to the currently logged-in user.

     

     

    If this response resolves your issue, please mark it as the Verified Answer so it can help other community members as well.
    ---------------------------------------------------------------------------------
     
    📩 Need more help? Mention @Kalathiya anytime!
    ✔️ Don’t forget to Accept as Solution if this guidance worked for you.
    💛 Your Like motivates me to keep helping!
  • WarrenBelz Profile Picture
    155,838 Most Valuable Professional on at
    Hi @senna,
    I will give you a couple of options that are both Delegable (the first is fully and the second is for practical purposes) and which one you use depends whether the user has one or multiple sections. If they only have one section
    With(
       {
          _Section:
          LookUp(
             Persons,
             Email = User().Email
          ).Section
       },
       Filter(
          Products,
          Section = _Section
       )
    )
    If there are multiple sections for the user
    With(
       {
          _Sections:
          Filter(
             Persons,
             Email = User().Email
          )
       },
       Ungroup(
          ForAll(
             _Sections As _S,
             Filter(
                Products,
                Section = _S.Section
             )
          ),
          Value
       )
    )
     
    Please Does this answer your question 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 answering Yes to Was this reply helpful? or give it a Like
    Visit my blog
    Practical Power Apps    LinkedIn  

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 424

#2
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#3
11manish Profile Picture

11manish 290

Last 30 days Overall leaderboard