Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

Display list of email addresses, in a combo box, using Office365Users

(1) ShareShare
ReportReport
Posted on by 28
Hi,
 
I'm trying to list the email id's of all the users in the organization, based on particular office locations.
 
I tried the following code in the Items property of the combo box
 
Office365Users.SearchUserV2({searchTerm:ComboBox1_1.SearchText}).value
 
It was working earlier, but gave irrelevant results. 
I want to add a filter condition to this code, which filters the email addresses, based on particular office locations.
 
The condition that I want to add is as follows,
 
OfficeLocation Not (["OfficeA", "OfficeB"]).
 
I'm unable to use the Not keyword as well, neither ! operator. It is throwing errors for both of them
 
Kindly help me with this, been stuck for long
 
 
Thanks,
Sneha
 
 
  • Suggested answer
    Michael E. Gernaey Profile Picture
    40,661 Super User 2025 Season 1 on at
    Display list of email addresses, in a combo box, using Office365Users
    Hi,
     
    First, why are you having them type in something IN the combobox that you are loading. You should have a Search TextInput
     
    What are the people typing in the ComboBox to search on??? I would recommend that you add a Search Text Box. Then you would do this
     
    1. I added a TextInput called Search
    2. i added a ComboBox calledEmailAdresses
     
    In my ComboBox Items I put this
     
    Filter(Office365Users.SearchUserV2({searchTerm: Search.Text}).value, OfficeLocation <> "OfficeA" And OfficeLocation <> "OfficeB") 
    
    And there you have it.

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

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,594 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,928 Most Valuable Professional

Leaderboard