cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
sippyx
Level: Powered On

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

@sippyx 

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.
1 REPLY 1
Super User
Super User

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

@sippyx 

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.

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

FifthImage

Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!

Users Online
Currently online: 228 members 4,999 guests
Please welcome our newest community members: