cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
marial16
Post Partisan
Post Partisan

Search person or group field in powerapps

Hallo,

I was wondering if there is another way to use a search input field for person or group fields instead of creating an additional column in the SharePoint list with the display name as a text field

 

i use a gallery and filter my list. and i have already used search function but regarding single lone of text fields

1 ACCEPTED SOLUTION

Accepted Solutions
v-yutliu-msft
Community Support
Community Support

Hi @marial16 ,

Do you want to filter based on display name of person or group field?
Two solutions:
1)use search function

Yes, if you use search function, you need to add a column with display name as a text field.

The reason is that search function only works for text type field. Other data type are not supported.

So the formula should be like this:

Search(AddColumns(table,"displayname",personfield.DisplayName),
       Textinput.Text,
       "displayname",
       "field1","field2",...)

2)use filter function

Filter function could work for multiple data type.

If you use this function, you no longer need to add another column.

Formula should be like this:

Filter(table,
Textinput.Text in personfield.DisplayName,
Textinput.Text in field1,
Textinput.Text in field2,
....)

 

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-yutliu-msft
Community Support
Community Support

Hi @marial16 ,

Do you want to filter based on display name of person or group field?
Two solutions:
1)use search function

Yes, if you use search function, you need to add a column with display name as a text field.

The reason is that search function only works for text type field. Other data type are not supported.

So the formula should be like this:

Search(AddColumns(table,"displayname",personfield.DisplayName),
       Textinput.Text,
       "displayname",
       "field1","field2",...)

2)use filter function

Filter function could work for multiple data type.

If you use this function, you no longer need to add another column.

Formula should be like this:

Filter(table,
Textinput.Text in personfield.DisplayName,
Textinput.Text in field1,
Textinput.Text in field2,
....)

 

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

when you say table you mean the name of the List?

Hi @marial16 ,

Yes, that's right.

You could refer the syntax for these two functions:
https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-filter-lookup

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

I tried your suggestion for the filter function, but now my gallery will only filter based on the first character entered in the text box. When 2 characters are entered it does not return any results in the list even though they should exist.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (3,246)