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 the list of ...
Power Apps
Unanswered

Filtering the list of managers in a department in People Picker

(0) ShareShare
ReportReport
Posted on by 215

Hello there,

Is there a way to filter only the list of Managers of a specific department in People Picker? I have a People picker field which lists all the users of our organisation. I would like this people picker to show only the managers of a specific department when the user search. Any help on this is really appreciated.

Thanks!

 

Categories:
I have the same question (0)
  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @PowerUser19 ,

    Could you please tell me that how you configure the specific department?

     

    Here is a simple demo for you.

    1). Create a dropdown to get all the departments,Dropdown1 Items:

    Filter(Distinct(ForAll(Office365Users.SearchUserV2().value,ThisRecord.Department),Value),!IsBlank(Result))

    2). Get all users in a certain department, Dropdown2 Items:

    Filter(Office365Users.SearchUserV2().value,Department=Dropdown1.Selected.Result)

    3). Get manager of the specific department,TextInput1 Default:

    Office365Users.ManagerV2(Dropdown2.Selected.Id).displayName

     

  • PowerUser19 Profile Picture
    215 on at

    Hi @v-qiaqi-msft ,

     

    Thanks so much for your response. I would like to get the list of managers of a specific department (which is constant). So I will need to bring the name of the department somewhere in the filter to list the managers of that constant department. The name of the department is not selected from any other field. 

     

    I stored the name of the department in a label and tried using that in the 3rd option you provided

    Office365Users.ManagerV2(Label38.Text).displayName

    It gives me "Expected Table Value" error. Not sure what I am missing here. Attaching the image for your reference.

     

    List of managers who are in "Department X"

    Img1.PNG
  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @PowerUser19,

    Just remove the parameter displayName as below:

    Office365Users.ManagerV2(Label38.Text)

    Then select the displayName from the field:

    vqiaqimsft_0-1664173091004.png

     

  • PowerUser19 Profile Picture
    215 on at

    Hi @v-qiaqi-msft ,

    Please excuse my ignorance here. I do not see "value" option in my people picker field. I see only "fields" option.  I couldn't select "Display Name" in there.

    PowerUser19_0-1664179188374.png

     

  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @PowerUser19,

    vqiaqimsft_0-1664180562421.png

     

  • PowerUser19 Profile Picture
    215 on at
  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @PowerUser19,

    This is an issue related to your API request, just try to remove the connector and re-connect.

    Could you please try to troubleshoot it by yourself if there is an issue unrelated to the one you mentioned?

     

    If the Combo Box is not necessary, I would suggest you use a Dropdown instead, which I have provided the complete solution in my first reply.

     

     

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 84

#2
WarrenBelz Profile Picture

WarrenBelz 79 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 40 Super User 2026 Season 1

Last 30 days Overall leaderboard