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

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

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 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard