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 / How do I filter Combob...
Power Apps
Answered

How do I filter Combobox to show emails domains when using Office365Users Data Source?

(0) ShareShare
ReportReport
Posted on by

Hi Power App Community,

 

I am trying to set my Combobox which is used to search for Office365 Users to show emails for two specific domains

Domain 1: @wellcome.org

Domain 2: @ippsecretariat.org

 

When I specify one domain it works with no problem but when I try to use a boolean function such as Or, And etc it breaks the combobox but likes the function as it gives no errors?.

 

Here is a screengrab of when it works fine with one domain.

Formula: Filter(Office365Users.SearchUser({searchTerm:ComboBox1.SearchText}),EndsWith(Mail,"@wellcome.org"))

Masum172_1-1685228477773.png

 

Here is when I try to use two domains using a boolean such as Or, And, & which it gives no errors but breaks combo box as doesn't display anything.

Formula: Filter(Office365Users.SearchUser({searchTerm:ComboBox1.SearchText}),EndsWith(Mail,"@wellcome.org"And"ippsecretariat.org"))

Masum172_2-1685228594556.png

 

If someone can kindly assist me with this I would be ever so grateful!

 

Thanks

Categories:
I have the same question (0)
  • Verified answer
    cha_cha Profile Picture
    4,932 Moderator on at

    Hello @Masum172 

     

    You can use a combination of the Nested With function and Ungroup function for this.

    With(
     {
     _domA: Filter(Office365Users.SearchUser({searchTerm:ComboBox1.SearchText}),EndsWith(Mail,"@wellcome.org")) ,
     _domB: Filter(Office365Users.SearchUser({searchTerm:ComboBox1.SearchText}),EndsWith(Mail,"@ippsecretariat.org"))
     },
     With(
     {
     _result: Ungroup(
     Table(
     {res: _domA},
     {res: _domB}
     ),
     "res"
     )
     },
     _result
     )
    
    )

     

    The code above filters user data from two different email domains using the Filter function, combines them into a table using the Table function, and then ungroups the table using the Ungroup function to obtain a single collection of individual records.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
Haque Profile Picture

Haque 103

#2
WarrenBelz Profile Picture

WarrenBelz 82 Most Valuable Professional

#3
wolenberg_ Profile Picture

wolenberg_ 67 Super User 2026 Season 1

Last 30 days Overall leaderboard