web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Office365Users SearchU...
Power Apps
Answered

Office365Users SearchUserV2 Filter options

(0) ShareShare
ReportReport
Posted on 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:
I have the same question (1)
  • Verified answer
    RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @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.

  • Community Power Platform Member Profile Picture
    on at

    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 🙂

  • Lu_Mo Profile Picture
    25 on at

    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.

  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @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 at

    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.

  • Lu_Mo Profile Picture
    25 on at
  • mariagiugno Profile Picture
    23 on at

    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! 

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard