cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

Office 365 Connection, Delegating filtering by City in SearchUser function

I have the following function in my powerapp in a combobox's item property and would like to get it to delegate the filtering by City since there are more users than the limit in my company's directory. 

Filter(Office365Users.SearchUser({searchTerm:ComboBox.SearchText,top:999}),(City="City"))

The current version creates an awkward searching experience where for example, if a user was the search for Amelia and type in A only one entry with an A would show when more possible exist. Amelia would only show after typing Am since it is selecting 999 entries from my companies entire directory that fit the search criteria.  I looked through the documentation and saw that the searchTerm filter only applies to certain properties of user.  I feel like there has to be a workaround for this that I have not been able to find through google searches.  Any suggestions would be appreciated. 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III
Super User III

Re: Office 365 Connection, Delegating filtering by City in SearchUser function

@Anonymous 

The SearchUser function will only search the following fields:   display name, given name, surname, mail, mail nickname and user principal name.

If there are more users than you can search at one time (i.e. the maximum Top: parameter), then you will not be able to do this in the way you want.  

You will need instead, to collect all the users into a collection and then run your search against that.  It gets a little tricky with that function to do, but it is possible.

 

I hope this is helpful for you.

 

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

View solution in original post

1 REPLY 1
Highlighted
Super User III
Super User III

Re: Office 365 Connection, Delegating filtering by City in SearchUser function

@Anonymous 

The SearchUser function will only search the following fields:   display name, given name, surname, mail, mail nickname and user principal name.

If there are more users than you can search at one time (i.e. the maximum Top: parameter), then you will not be able to do this in the way you want.  

You will need instead, to collect all the users into a collection and then run your search against that.  It gets a little tricky with that function to do, but it is possible.

 

I hope this is helpful for you.

 

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,579)