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)
Solved! Go to Solution.
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?
just realised my error should be
Distinct(Filter(Office365Users.SearchUser({searchTerm:ComboBox1.SearchText}),"company1" in CompanyName Or "company2" in CompanyName),DisplayName)
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?
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
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
187 | |
70 | |
49 | |
36 | |
25 |
User | Count |
---|---|
239 | |
111 | |
89 | |
88 | |
66 |