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
Super User
Super User

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
Super User
Super User

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
thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (4,794)