Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Office365Users SearchUserV2 Filter options

Like (0) ShareShare
ReportReport
Posted on 16 Feb 2021 14:25:44 by

Hello Everyone.

 

I recently build a People Picker for my organization since I needed to have a searchable combobox, where on select it shows the picture + telephone number + email for the selected person.

 

The problem however, is that I have no clue on where to find documentation for populating the combobox with only employees, and not service accounts, meeting rooms etc.

 

I am using the following expression for my Items in the combobox: Office365Users.SearchUserV2({top:500}).value

 

Is there any way to customize the expression so for example only user accounts with the "Zip or Postal code" filled out in Contact info are displayed in the search?

 

Any help is greatly appreciated.

Categories:
  • mariagiugno Profile Picture
    23 on 09 Mar 2023 at 17:01:51
    Re: Office365Users SearchUserV2 Filter options

    Hi @RandyHayes,

     

    Do you know how I would filter by CompanyName or the Distribution List for that Company to display the emails in a dropdown?
    This is what I have so far:

     

     

     

    Distinct(Filter(Office365Users.SearchUserV2({searchTerm:COMP_designer.SearchText}),Mail),
    AccountEnabled, CompanyName = "Company Name"

     

     

    Thanks for your assistance! 

  • Lu_Mo Profile Picture
    25 on 24 Mar 2021 at 15:30:24
  • Lu_Mo Profile Picture
    25 on 24 Mar 2021 at 15:06:55
    Re: Office365Users SearchUserV2 Filter options

    Hi! Our company has ten thousands of entries... What I will do is to check in UserVoice if there is already an entry or I will create one: to be able to delegate a filter expression in Office365Users.SearchUser.

  • RandyHayes Profile Picture
    76,287 Super User 2024 Season 1 on 24 Mar 2021 at 14:00:04
    Re: Office365Users SearchUserV2 Filter options

    @Lu_Mo 

    Yes, in that particular formula, it is restricted to the top 500.  If that parameter is not specified, then the top 1000 is the default.

  • Lu_Mo Profile Picture
    25 on 24 Mar 2021 at 11:57:30
    Re: Office365Users SearchUserV2 Filter options

    Problem here is that top:500 will be applied BEFORE the filter, in case there are more than 500 entries, those will not be taken in consideration.

  • Community Power Platform Member Profile Picture
    on 17 Feb 2021 at 14:05:42
    Re: Office365Users SearchUserV2 Filter options

    Thank you so much for this! Exactly what I was looking for. Did not for one second think to put the Filter around the function. You sir, is a lifesaver 🙂

  • Verified answer
    RandyHayes Profile Picture
    76,287 Super User 2024 Season 1 on 16 Feb 2021 at 14:52:27
    Re: Office365Users SearchUserV2 Filter options

    @Anonymous 

    Consider the following for your app:

       Filter(Office365Users.SearchUserV2({top:500}).value, !IsBlank(PostalCode))

     

    This will filter out any account that does not have a postal code.

     

    I hope this is helpful for you.

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,668 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,004 Most Valuable Professional

Leaderboard