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 / Search and Filter pers...
Power Apps
Answered

Search and Filter person or group field

(0) ShareShare
ReportReport
Posted on by 381

Hi. 

I have a sharepoint list which has a Main Owner and Secondary Owner Column which are People and Group Type, there is a also an Item Name in the SharePoint List. 

 

My aim is to search on Item Name and the Main / Secondary Owner. 

 

I have placed a data table on my power app which shows the Item Name, Main Owner and Secondary Owner. 

 

On my items property on the data table, i have the following code : Search('MyDataSource', txt_Search.Text,"ItemName")

 

This works absolutely fine. Now i wish to incorporate a Filter in the search box so it allows the user to filter the data table based on the Main Owner and Secondary Owner.. 

 

I have tried the following : Filter(
Search(
'MyDataSource',
txt_Search.Text,"Name"
),txt_MO_and_SO_Search.Text,'Main Owner')

 

But it doesn't work.  Basically, i know Search does not work on People and Group Fields, however, the Filter does. 

I dont want to create another search box on the page to filter the data source by owner, i would like to use the same search box to search on item name and also filter the data set by owner and secondary owner. 

Can anyone help?

 

Thanks

 

Categories:
I have the same question (0)
  • Verified answer
    StalinPonnusamy Profile Picture
    Super User 2024 Season 1 on at

    Hi @Vstar19 

     

    My assumption is MO and SO are Person fields. So filtering on displayname.

     

    With(
     {_Item: MyDataSource},
     Filter(
     _Item,
     (IsBlank(txt_Search.Text) || StartsWith(
     ItemName,
     txt_Search.Text
     )) && (IsBlank(txt_MO_and_SO_Search.Text) || StartsWith(
     'Main Owner'.DisplayName,
     txt_MO_and_SO_Search.Text
     ) || StartsWith(
     'Secondary Owner'.DisplayName,
     txt_MO_and_SO_Search.Text
     ))
     )
    )

     

    StalinPonnusamy_0-1634179773276.png

     

  • StalinPonnusamy Profile Picture
    Super User 2024 Season 1 on at

    Hi @Vstar19 

     

    Working code for reference

    StalinPonnusamy_1-1634179945913.png

     

  • MaciejKucharski Profile Picture
    13 on at

    I've encountered a similar problem and found a workaround with AddColumns() function here:

     

    https://www.spguides.com/powerapps-search-user/#PowerApps_Search_Person_Field:~:text=Group%20in%20Po...

     

    Hope it helps someone who had been struggling with this too and kudos to SPGuides for posting it. 

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 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 207 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 150 Super User 2026 Season 2

Last 30 days Overall leaderboard