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 Shar...
Power Apps
Answered

Filter Gallery by SharePoint List Person

(0) ShareShare
ReportReport
Posted on by 278

I have created a Gallery, from a SharePoint List, that will list all courses associated to the currrent user sign in using Office365 Users Connection.  I have setup a input box to allow users to search the users DiplayName, Email, or Department. I attempt to use the following formula:

Filter(SharePointList, Instructor.Email = User().Email)

 

It does not seem to be working.   I am running into the following error:

Invalid argument Type.  Cannot user table values in this context. 

 

What is the proper way of comparing a user from a list to the current user?

Categories:
I have the same question (0)
  • mdevaney Profile Picture
    29,991 Moderator on at

    @duncant 

    Where did you put this code?  Which control & property?

     

    Filter(SharePointList, Instructor.Email = User().Email)

     

  • duncant Profile Picture
    278 on at

    Gallery Items

  • Verified answer
    v-yutliu-msft Profile Picture
    Microsoft Employee on at

    Hi @duncant ,

    Do you want to filter items based on current user?

    Could you tell me 

    1)the data type of Instructor field?

    2)whether Instructor field allow multiple person?

    If Instructor field is a person field and allows multiple person, you could set the gallery's Items:

    Filter(SharePointList, User().Email in Instructor.Email) 

     Because if  Instructor field allow multiple person, then "Instructor.Email" represents a table, not a value. You need to use "in"

     to compare.

     

     

    Best regards,

  • mdevaney Profile Picture
    29,991 Moderator on at

    @duncant 

    You did not say which property of the gallery you put this code in.

  • duncant Profile Picture
    278 on at

    Instructor field is person type  that allows multiple.

  • mdevaney Profile Picture
    29,991 Moderator on at

    @duncant 

    No.  I am asking "what property of the gallery did you put your code into"?

  • ilton Profile Picture
    194 on at

    Hi @duncant 

    You should have something like

    Filter(SharepointList, email = User().Email)

    instead of

    Filter(SharepointList, Instructor.Email = User().Email)

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @duncant ,

     

    Have set up a Sharepoint list with a multiple person selection column and tested, seems to be working with the following in the Items property of the gallery:

     

    Filter(SharepointList, User().Email in Instructor.Email)

     

    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

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!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 610

#2
Haque Profile Picture

Haque 317

#3
WarrenBelz Profile Picture

WarrenBelz 315 Most Valuable Professional

Last 30 days Overall leaderboard