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 By Curr...
Power Apps
Unanswered

Filter Gallery By Current User - People Picker SP List

(0) ShareShare
ReportReport
Posted on by 162

Hey good people, another head scratcher that seems to end in the response "Don't Use People Picker type in Sharepoint if you want to use PowerApps".

 

I have a SP list with a column Dispatch - This is a people picker type

I have a gallery that I would like to Filter so it only displays items in the dispatch column that = Current User

 

I just constantly get a delegation warning and no results.

 

I have tried the User() function but this doesn't seem any better

I have tried setting the variable OnVisible but this doesn't work 

 

It seems every time the People Picker is used with a filter it results in failure 😞 

Categories:
I have the same question (0)
  • Dawidvh Profile Picture
    1,346 on at

    Hi @PeterDonohue

     

    I love Person\Group columns when working in a SharePoint list only, but am sad to say that when you start consuming that list in PowerApps, it does complicate matters. Do users interact with the SharePoint list directly as well, or only through PowerApps?

     

    a) First, we always write the user id into a variable OnStart for the app. If you user user().Email directly in the filter you will have delegation problems regardless of the rest of your formula. Even if you stored the user email address in a simple text field in SharePoint you will still get a delegation warning if you compared it against user().Email at filter time.

    Set(varUserId,User().Email)

    b) Rember that the Employee\Group column can be seen a record in itself, so you have to specify the property of the column that you want to filter agains. In the below example I am using the Email Address.

    Filter(Leave,Employee.Email = varUserId)

    This filter works, but you will still face a delegation concern.

     

    I am not aware of any way to fix the delegation out of the box. If you have more than 2000 records you can consider is to create another text column in the SharePoint list, and create a Flow to populate the column by extracting the email address from the people column, but this will be interesting and consume a Flow run everytime a record is created. (Unfortunately SharePoint Calculated Columns also can't user the people\group column)

     

    Let me know if you don't come right and if you need help to put the flow together.

     

    twitter: @dawidvh

    youTube: https://www.youtube.com/channel/UCIMe_ErQZP5chbI9UyW0xLw

    >>If you found this reply helpful, please mark this as the answer to close the topic and make it easier to find for other people with similar questions.<<

     

     

     

  • PeterDonohue Profile Picture
    162 on at

    Thanks for the response mate, really appreciate it. I think this might be just one of those really significant failings of the application suite unfortunately. I'll find a work around 

  • v-yuxima-msft Profile Picture
    Microsoft Employee on at

    Hi @PeterDonohue,

     

    Do you want to filter the gallery ‘s dispatch column by current user?

    I think you should change your formula expression’s “=” to “in”.

    If you search multiple names in your one column you use “in’.

     

    You can try following workaround.

    I test as next:

    Data Source:

    20190208PeoplePicker(my SP list name)

    Dispatch(Person or Group type column)

    20190208sp1.png

    App Test:

    Gallery.Items: Filter('20190208PeoplePicker',User().FullName in Dispatch.DisplayName)

    20190208peoplepickerapptest1.jpg

     

    Hope this can be helpful.

    Best Regards.

    Yumia

  • Dawidvh Profile Picture
    1,346 on at

    Hi @v-yuxima-msft

     

    The in operator is also not delegatable (please ask the guys in your office when it will be Smiley Happy), even if you write the username into a variable as mentioned in my post above which is delegatable, the in operator will break the delegation.

     

    twitter: @dawidvh

    youTube: https://www.youtube.com/channel/UCIMe_ErQZP5chbI9UyW0xLw

    >>If you found this reply helpful, please mark this as the answer to close the topic and make it easier to find for other people with similar questions.<<

  • PeterDonohue Profile Picture
    162 on at

    After a bunch of digging I figured it out. The delgation warning still persists and I will set up a warning system to negate this but the culprit was the list item set to multiple selections AND the name (presence).

     

    I changed it to single selection only

    Only Name

    Set the variable OnStart (although I may move this to OnVisible)

     

    Set(CurrentUser,Office365Users.MyProfile().DisplayName)

    Call the variable 

    Filter('Media Enquiries',Dispatch.DisplayName = CurrentUser)

    All working just with a lovely yellow triangle 🙂

     

    Thanks again people 🙂

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I am facing a similar issue and confirmed it works when I changed User/Group item to single selection. But I need to keep it to multiple selections. Can anybody show a workaround?

  • PeterDonohue Profile Picture
    162 on at

    I'm just guessing, but I would imagine that this would be a fundamental issue as you are asking for a filter by 1, but giving people the opportunity to select multiple so what happens in the case of multiple people being selected, does it then filter by all selected? Programatically I'd imagine this would cause an issue. 

     

    The only way I can think of is to add multile columns for people, or maybe populate a combo box with the selection ande try to filter by the selected values in the combo box?Maybe? 🙂

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I think I found a workaround. It is a bit complicated though.

    I prepared 2 galleries for the same data source. The first one is to show all items of the data source with a text box which shows e-mail addresses of the selected people.

    PersonInChargeEmail = Concat(ThisItem.PersonInCharge, Email)

    Add another label to show if the current user is included in the selected people.

    IsMine = If(User().Email in PersonInChargeEmail.Text,"true")

     In this case, the label "IsMine" shows "true" if the current user is included in the "PersonInCharge" - people picker which allows multiple selections.

    Then configured OnVisible as below - collect items with "true" value only.

    OnVisible = ClearCollect(MyItems,Filter(Gallery1.AllItems,IsMine.Text="true"))

    Finally, show all the items of the "MyItems" collection in the 2nd gallery.

    Gallery2.Items = MyItems

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 July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 392 Most Valuable Professional

#2
11manish Profile Picture

11manish 181 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 112 Super User 2026 Season 2

Last 30 days Overall leaderboard