cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Ashok2
Post Patron
Post Patron

Search with People picker and string in gallery

Hi All 

 

Is there a way we can search in gallery from both column type people picker and String ?

1 ACCEPTED SOLUTION

Accepted Solutions
v-chenzhi
Community Support
Community Support

Hi @Ashok2 ,

 

May I ask what the gallery's data source is? Is it a SharePoint list?

I did a test on my side in SharePoint.

I create a list named Test and add two columns.

Set the Gallery's items property to:

Filter(Test,Or(Person1.DisplayName in TextInput.Text,Text1 in TextInput.Text))

For example, I add those record in sharepoint.

In canvas, I write test3 in TextInput, Then two test3 of different data types are displayed in the gallery.

 

vzhichen_4-1632994655204.png         vzhichen_1-1632993629263.jpeg

 

 

Best Regards,

Zhi Chen

 

View solution in original post

2 REPLIES 2
zmansuri
Super User
Super User

It's not possible to directly search on people picker that's why you use AddColumn function in the code. So let's say you have people column named "Employee". And one text column named "Name". your code will be

 

Search(AddColumn(ListName,"EmpText",Employee.DisplayName),TextInput.Text,"EmpText","Name")

 

Above code will dynamically add column named EmpText in your gallery and search on it.

v-chenzhi
Community Support
Community Support

Hi @Ashok2 ,

 

May I ask what the gallery's data source is? Is it a SharePoint list?

I did a test on my side in SharePoint.

I create a list named Test and add two columns.

Set the Gallery's items property to:

Filter(Test,Or(Person1.DisplayName in TextInput.Text,Text1 in TextInput.Text))

For example, I add those record in sharepoint.

In canvas, I write test3 in TextInput, Then two test3 of different data types are displayed in the gallery.

 

vzhichen_4-1632994655204.png         vzhichen_1-1632993629263.jpeg

 

 

Best Regards,

Zhi Chen

 

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,561)