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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Display list of email ...
Power Apps
Suggested Answer

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
 
 
Categories:
I have the same question (0)
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,963 Moderator on at
    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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 342 Most Valuable Professional

#2
11manish Profile Picture

11manish 234

#3
Valantis Profile Picture

Valantis 187

Last 30 days Overall leaderboard