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 Gallery Three Ways
Power Apps
Answered

Filter Gallery Three Ways

(0) ShareShare
ReportReport
Posted on by 5,331 Moderator

I have a Gallery.

I need to filter said Gallery in three different ways.

1. If User is 'Associate' filter Gallery based on UserName
    - Associate can only see their own data in Gallery.
2. If User is 'Supervisor' filter Gallery based on UserName and all subordinates there under
   - Supervisor can see their own data and all 'Associates' assigned to them.
   - My data source (SPList2 has a line item for each 'Associate' and a column for
     'Supervisor'
   - If User is HR no filter applied; HR user can see all data

I've gotten most of it to work using the following -

If(PositionFld.Text="Associate",
   Filter(Collection1, AssociateFullName = User().FullName),
   SortByColumns(Filter(Collection1,
   StartWith(AssociateLastName,
   AssociateLastNameFld.Text)),

   "AssociateFullName"))

Categories:
I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    156,100 Most Valuable Professional on at

    Hi @Phineas ,

    Firstly set the Default of AssociateLastNameFld to "" (empty string) and try this

    SortByColumns(
     Filter(
     Collection1,
     Switch(
     PositionFld.Text,
     "Associate",
     AssociateFullName = User().FullName,
     "Supervisor", 
     Supervisor = User().FullName,
     "HR",
     StartWith(
     AssociateLastName,
     AssociateLastNameFld.Text
     )
     ),
     "AssociateFullName"
     )
    )

     

    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

     

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

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 325 Most Valuable Professional

#2
11manish Profile Picture

11manish 165

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 88 Super User 2026 Season 1

Last 30 days Overall leaderboard