cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
HeyDave
Frequent Visitor

People Picker Filter Behavior

Hi Teams.  I have an interesting behavior that hopefully you can help me with. I have a sharepoint list of applications with the owner as a people field. My canvas app has two filter headers, one the app name, the other a people picker. Using this filter method with a Text Input for the people filter:

ClearCollect(colGridData,Filter('Application List', StartsWith('Owner'.DisplayName, TextInputOwner.Text) && (IsBlank(AppNameSearch.Text) || IsEmpty(AppNameSearch.Text) || StartsWith('App Name',AppNameSearch.Text))));

 

The app filter does sort the gallery when clicking outside the input field - as expected.

The Owner text field, does not filter on clicking outside the search box - but does filter properly when triggering a button to Load Data.

 

I'm puzzled why one search box works when exiting (auto loading the data) and the other does not. Any thoughts?  I'm definitely struggling with the people picker.

2 ACCEPTED SOLUTIONS

Accepted Solutions
RandyHayes
Super User
Super User

@HeyDave 

This is because you are using these in behavioral actions.  You are better off if you want immediate results to skip duplicating all your data into app memory with a collection.

Just set your Items property to:

Filter('Application List', 
    StartsWith('Owner'.DisplayName, TextInputOwner.Text) && 
    (IsBlank(AppNameSearch.Text) || StartsWith('App Name',AppNameSearch.Text))
)

 

Also, don't use IsEmpty on a text value...IsEmpty is for records.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

Thanks Randy. This helped me see the error in my ways & got me up and running.

View solution in original post

2 REPLIES 2
RandyHayes
Super User
Super User

@HeyDave 

This is because you are using these in behavioral actions.  You are better off if you want immediate results to skip duplicating all your data into app memory with a collection.

Just set your Items property to:

Filter('Application List', 
    StartsWith('Owner'.DisplayName, TextInputOwner.Text) && 
    (IsBlank(AppNameSearch.Text) || StartsWith('App Name',AppNameSearch.Text))
)

 

Also, don't use IsEmpty on a text value...IsEmpty is for records.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Thanks Randy. This helped me see the error in my ways & got me up and running.

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.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

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 (3,595)