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 / Filtering Searchable i...
Power Apps
Answered

Filtering Searchable items in a combobox

(0) ShareShare
ReportReport
Posted on by 263

Hi all,

 

I have the below in a combobox Items property to pull user data from AD I am then using the distinct function to remove duplicate displaynames and filtering on the company name to only include certain companies......... This works fine with the Filter but as soon as I add the distinct function it breaks.... Any pointers would be welcome!

 

Filter(Distinct(Office365Users.SearchUser({searchTerm:ComboBox1.SearchText}),DisplayName),"Company1" in CompanyName Or "Company2" in CompanyName)

Categories:
  • MJ84 Profile Picture
    263 on at

    just realised my error should be

    Distinct(Filter(Office365Users.SearchUser({searchTerm:ComboBox1.SearchText}),"company1" in CompanyName Or "company2" in CompanyName),DisplayName)

  • Verified answer
    LimeLeaf Profile Picture
    278 on at

    Hi @MJ84,

    ya this i exactly what i was thinking about. 
    Don't filter the distinct selection - use distinct on the filtered result.

    Does it work?

  • zmansuri Profile Picture
    6,048 Super User 2024 Season 1 on at

    a3.jpg

     

    When you use Distinct it created a table with single column with "Result" as header. In that table you are searching for company. Which is not available. So i think @MJ84 's code will work for you

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 July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 411 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 338

#3
WarrenBelz Profile Picture

WarrenBelz 256 Most Valuable Professional

Last 30 days Overall leaderboard