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 / Gallery filter and sea...
Power Apps
Unanswered

Gallery filter and search based People Picker Field

(0) ShareShare
ReportReport
Posted on by 185

Hello,

 

I have a List called Mentor List. I have to create a profile looking app where user can filter the list and can find their mentor. I created a gallery but I need help to add filter/search function. Mentor name is a People Picker field and I am not sure how to add filter so that user can find a mentor. Please help !

Categories:
  • Rajkumar_M Profile Picture
    3,747 Moderator on at

    Hi @jasminepatel90 

     

    Try this formula,

     

    Filter(
    'Mentor List',
    IsBlank(txtSearch.Text) ||
    StartsWith(
    Mentor.DisplayName,
    txtSearch.Text
    )
    )

     

    Thanks!

     

    If my response has been helpful in resolving your issue, I kindly request that you consider clicking "Accept as solution" and "giving it a thumbs up" as a token of appreciation.

     

  • jasminepatel90 Profile Picture
    185 on at

    Thank you for replying back to me but when I try to add second part of the code which is || startswith(Mentorname.displayname,textsearch.text)) but its not reading my column name am I missing anything ?

  • Rajkumar_M Profile Picture
    3,747 Moderator on at

    Can you try this formula,

     

    Filter(
    'Mentor List',
    IsBlank(txtSearch.Text) ||
    StartsWith(Mentor.DisplayName, textSearch.Text) ||
    StartsWith(MentorName.DisplayName, textSearch.Text)
    )

     

    Thanks!

     

    If my response has been helpful in resolving your issue, I kindly request that you consider clicking "Accept as solution" and "giving it a thumbs up" as a token of appreciation.

  • jasminepatel90 Profile Picture
    185 on at

    what about search button do I need to add anything there Onselect Properties ?

  • jasminepatel90 Profile Picture
    185 on at

    so I have this on item property of gallery

    Filter('MENTOR TOOL',VarMentor.DisplayName <> Blank(),MentorName.DisplayName = VarMentor.DisplayName)
    and this on search button Onselect 

    Set(VarMentor,If(IsBlank(SearchName.Text),Blank(),First(Office365Users.SearchUserV2({searchTerm:SearchName.Text,top:1}).value)))
     
    its not giving me any error but its also not showing any results  too 
     
  • jasminepatel90 Profile Picture
    185 on at

    so it did show me my result but I have to type in whole name how can I add Startswith in Person column ?

  • Rajkumar_M Profile Picture
    3,747 Moderator on at

    This formula may solve your issue,

     

    Filter(
    'Mentor List',
    IsBlank(txtSearch.Text) ||
    StartsWith(Mentor.DisplayName, txtSearch.Text)
    )

    Thanks!

     

    If my response has been helpful in resolving your issue, I kindly request that you consider clicking "Accept as solution" and "giving it a thumbs up" as a token of appreciation.

     

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 236 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 188 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 130

Last 30 days Overall leaderboard