web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / browsegallery1, filter...
Power Apps
Unanswered

browsegallery1, filter for user in person column that allows multiple selections

(0) ShareShare
ReportReport
Posted on by 920 Super User 2024 Season 1

Hi,

 

Normally I filter my sp list in browsegallery like so - 'Assigned to'.Email = User().Email 

 

Assigned to is a person field

 

but what do I do if I want to find a user in a person field that allows selection of multiple people?  Is there any limitations to this?

 

i want to do something like this -

 

Filter([@testme_1],
('Assigned to'.Email = User().Email Or User().Email in ShowColumns('Delegated to1', "Email") Or User().Email in ShowColumns('Delegated to2', "Email") Or User().Email in ShowColumns('Delegated to3', "Email") Or User().Email in ShowColumns('Delegated to4', "Email") Or User().Email in ShowColumns('Delegated to5', "Email"))

 

 

But showcolumns doesnt really work I notice.

 

 

 

Categories:
I have the same question (0)
  • LaurensM Profile Picture
    12,516 Moderator on at

    Hi @wonka1234,

     

    You can use the following approach: 'User().Email in PersonColumn.Email'

    Filter(
     [@testme_1],
     'Assigned to'.Email = User().Email || User().Email in 'Delegated to1'.Email || 
     User().Email in 'Delegated to2'.Email Or User().Email in 'Delegated to3'.Email || User().Email in 'Delegated to4'.Email || User().Email in 'Delegated to5'.Email
    )

     

    Please note that this approach is non-delegable because of the 'in' operator. Your list should not exceed your Data Row Limit (see app settings, default 500 - max 2000).

     

    If this solves your question, would you be so kind as to accept it as a solution & give it a thumbs up.

    Thanks!

  • wonka1234 Profile Picture
    920 Super User 2024 Season 1 on at

    @LaurensM  thanks! but i have more then 2k rows! what can I do?

  • LaurensM Profile Picture
    12,516 Moderator on at

    @wonka1234,

     

    You could use one of the following workarounds:

    • Create a flow that filters the data and returns the records to your app (see blog post by Matthew)
    • Create a collection larger than 2000 records and apply the filter to your collection

     

    If you don't want to use an indirect workaround, you may have to limit the data via a delegable query first. There are several options your could use, one example could be only displaying the records within a certain month or year (can be changed via a dropdown). This would be used as a prefilter to limit the amount of records returned.

     

    I hope this helps!

  • wonka1234 Profile Picture
    920 Super User 2024 Season 1 on at

    @LaurensM  thanks

    Can I do something like this - 

     

    Filter(Filter([@testme_1],

    (Status = "In Progress" Or Status = "NOT STARTED")),

    'Assigned to'.Email = User().Email || User().Email in 'Delegated to1'.Email ||
    User().Email in 'Delegated to2'.Email Or User().Email in 'Delegated to3'.Email || User().Email in 'Delegated to4'.Email || User().Email in 'Delegated to5'.Email

  • Verified answer
    LaurensM Profile Picture
    12,516 Moderator on at

    @wonka1234,

     

    Certainly! Prefiltering is a great way to make your query partly delegable. As a small addition (optional), I prefer to add a With function and some inline comments to improve code readability - especially should the complexity increase later on.

     

    With(
     {
     //Prefilter via delegable condition (Output should not exceed Data Row Limit)
     wPrefilter: Filter(
     [@testme_1],
     Status = "In Progress" || Status = "NOT STARTED"
     )
     },
     //Apply non-delegable conditions on prefiltered dataset
     Filter(
     wPrefilter,
     'Assigned to'.Email = User().Email || User().Email in 'Delegated to1'.Email ||
     User().Email in 'Delegated to2'.Email Or User().Email in 'Delegated to3'.Email || User().Email in 'Delegated to4'.Email || User().Email in 'Delegated to5'.Email
     )
    )

     

     As a small note, the prefilter output should not exceed your Data Row Limit.

     

    I hope this helps!

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard