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 / Employee Directory O36...
Power Apps
Unanswered

Employee Directory O365 - Drop down filter by JobTitle and CompanyName

(0) ShareShare
ReportReport
Posted on by 150

I am in the process of building a company employee directory.  I have the basics in it where I can search for someone an return the result but it's only by Displayname.  I'd like to have drop down filters that are populated by "CompanyName" and another populated by "JobTitle" from the Office365Users data source.  

 

If a user selects a CompanyName from the drop down the only results returned would be employees that match that company name.  Same goes for JobTitle but I would also like them to be used on conjunction with each other.  I select a CompanyName and then narrow it down further by selecting a JobTitle.  

 

I'd also like to just be able to search by JobTitle in my main Search bar where I can search by DisplayName.  I've looked through at least 50 posts on here about Employee Directories but saw nothing that really fit.  My frame up is below in the image.

 

 

CVannest_0-1646924332682.png

 

Categories:
I have the same question (0)
  • CVannest Profile Picture
    150 on at

    I've got the ComboBox's set to display the items from Office365Users for JobTitle and CompanyName using 

    Distinct(Office365Users.SearchUser(),JobTitle) and Distinct(Office365Users.Searchuser(),CompanyName)

     

    Just looking for the filter options to put on the gallery to let you filter down the results based on the combobox.

     

    Combobox for JobTitle is JobTitle1

    Combobox for CompanyName is CompanyName1

    Search box is TextSearchBox1

     

    Gallery is UserBrowseGallery1

  • CVannest Profile Picture
    150 on at

    I should add that I have about 15,000 employees in the company so I think the basic search result only returns the first 500?  Read something about a collection, but not very familiar with that piece.

  • CVannest Profile Picture
    150 on at

    Okay so I'm onto something here.

    Instead of ComboBox's I did DropDowns with the below code and set their "Items" to lookup CompanyName and JobTitle (We have several hundred job titles and some are still missing when I set it to top 500)

     

    Sort(Distinct(Office365Users.SearchUser(),CompanyName),Result,Ascending)
    Sort(Distinct(ShowColumns(Filter(Office365Users.SearchUser({top:500}),!IsBlank(JobTitle)),"JobTitle"),JobTitle),Result,Ascending)

    On my gallery Items I now have the below code.

    I can search from the Search bar by user name and I can filter out the results by using the CompanyName_1 drop down, however the "JobTitle_1" dropdown does not produce any results.  I also think I'm very limited due to how many employees we have so I could use some help in overcoming that issue.

     

    If(IsBlank(CompanyName_1.Selected.Result) And IsBlank(CompanyName_1.Selected.Result), Filter(Office365Users.SearchUser(
    {searchTerm:TextSearchBox1.Text,top:999}),
    AccountEnabled=true And IsBlank(JobTitle)=false),
    
    !IsBlank(JobTitle_1.Selected.Result) And IsBlank(JobTitle_1.Selected.Result), Filter(Office365Users.SearchUser(
    {searchTerm:TextSearchBox1.Text,top:999}),
    AccountEnabled=true And IsBlank(JobTitle)=false),
    
    !IsBlank(CompanyName_1.Selected.Result),Filter(Office365Users.SearchUser(
    {searchTerm:TextSearchBox1.Text,top:999}),
    AccountEnabled=true And IsBlank(JobTitle)=false And CompanyName = CompanyName_1.Selected.Result))

     

  • CVannest Profile Picture
    150 on at

    Due to the limitations of results returned, I'm taking a different approach.

    I want to be able to have 3 search boxes at the top of my Employee Directory.

    Search 1 = DisplayName search (EmpNameSearch) where users would search by name

    Search 2 = CompanyName search (EmpDealerSearch) where users would search by Dealership name "CompanyName"

    Search 3 = JobTitle search (EmpTitleSearch_1) where users would search by a Job Title "JobTitle"

     

    All of these are fields available in Office365Users so I'm hoping I can get a filter on the Gallery that would allow users to search in any of these boxes.

     

    Right now I have it so searching by Employee Name returns results with this coding since if a JobTitle is blank it means they are a service/generic account.

     

    Filter(Office365Users.SearchUser({searchTerm:EmpNameSearch.Text,top:999}),AccountEnabled=true, IsBlank(JobTitle)=false)

     

  • bgreen1 Profile Picture
    54 on at

    Did you ever find a solution? I am having the same issue.

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
WarrenBelz Profile Picture

WarrenBelz 525 Most Valuable Professional

#2
Haque Profile Picture

Haque 273

#3
Kalathiya Profile Picture

Kalathiya 232 Super User 2026 Season 1

Last 30 days Overall leaderboard