web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Apps
Unanswered

Search Text Box

(0) ShareShare
ReportReport
Posted on by 113

I am new to PowerApps and trying to create a new Canvas App to integrate various SharePoint libraries.

I stumbled in my first problem with a search text box, I need to filter a gallery based on two conditions a name (which comes from a PeoplePicker in SharePoint library) and a text field.

I can search by the text field named ‘Title’

Pic02.jpg

 

Pic01.jpg

Pic03.jpg

And this works fine as it returns the correct results.

However it does not work with the PeoplePicker, in SharePoint the field Name is called ‘Crew Member(s)’  and the url ‘Crew_x0020_Member_x0028_s_x0029_ ‘ this is set to ‘Person or Group’ (I have closed the parenthesis)

Pic04.jpg

Any thoughts on how I can search with a people picker column?

Thanks

Categories:
I have the same question (0)
  • BCBuizer Profile Picture
    22,505 Super User 2025 Season 2 on at

    Hi @E9Mate ,

     

    People/Group type columns store records, and the Search function can't deal with records. You'll have to select the column(s) within the records to search. However, since you need to provide literal column names, using the . operator will not work. The workaround is to add a column that has the literal value of the DisplayName:

     

    Search(
     AddColumns(
     'Crew List',
     "Person Name",
     'Crew_x0020_Member_x0028_s_x0029_'.DisplayName
     ),
     SearchBox.Text,
     "Person Name"
    )

     

     

  • E9Mate Profile Picture
    113 on at

    Hi @BCBuizer ,

    Thanks for the reply, just got to check this out. the solution works.

     

    I have however discovered that the search option may be limitative for extensive number of records and after a bit of research I have found out that the best approach would be the Filer/StartWith. I have gone down this approach including a SortByColumns.

    I am back at square one with the same problem trying to search for People/Group column.

     

    I tried to apply somehow you suggestion to the below code but again without success.

    SortByColumns(Filter('Crew List',StartsWith('Staff N.',SearchBox.Text)),"Title",SortOrder.Ascending)

     

    I have checked and the Filter/StartsWith display all the records so this is the way to go, what I need to achieve now is:

    • being able to search by the People/Group by using Crew_x0020_Member_x0028_s_x0029_ to the Filter/StartsWith option
    • being able to also search by Staff N. I am confused here as on SharePoint the column url is 'Title' and the column renamed 'Staff N' for some reason the suggestion when typing the above formula gave me Staff N. for the search and 'Title' for ordering
    • I would also need to filter in the gallery permanently all those records were the columns 'Active' is equal to No or empty value (the setting of this Active columns on SP is a Choice with drop down)

    Thanks,

     

  • BCBuizer Profile Picture
    22,505 Super User 2025 Season 2 on at

    Hi @E9Mate ,

     

    Indeed the Search function is not delegable and therefore may cause issues with large datasets. You are also correct to state that the StartsWith function is usually the alternative, although it provides slightly less functionality.

     

    To incorporate the additional requirements in your filter statement, you need to adjust the conditions in your Filter statement:

    SortByColumns(
    	Filter(
    		'Crew List',
    			StartsWith('Staff N.',SearchBox.Text) || 
    			StartsWith('Crew_x0020_Member_x0028_s_x0029_'.DisplayName,SearchBox.Text) ||
    			Active = "No" ||
    			IsBlank(Active)
    	),
    	"Title",
    	SortOrder.Ascending
    )

    Basically there are 4 conditions and any items that meets any of those 4 will be shown due to the use of the logical Or ( || operator).

     

    The above will work under the assumption that the Active column is a Text type. If it is a choice type, you need to replace Active with Active.Value 

     

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard