Skip to main content

Notifications

Power Apps - Building Power Apps
Unanswered

Filter People Picker by Department

(0) ShareShare
ReportReport
Posted on by

I have a screen that has a people picker field. I would like the user to start typing the name of a user and then user the Office365Users data to search for the entered text, but filter the results for folks in a specific department. For example, Julie may be a user in the company, but I would like the list to filter all the Julie's in a specific department. 

I am currently using this logic on the people picker's Items property. Although it searches and shows the correct available matches, if I am changing a record, it will not assign the new value or if I am entering a new record, it will not write the selected value to the SharePoint list people column.

Filter(Office365Users.SearchUser({searchTerm:violation_IssuedBy.SearchText,top:3}),Department="department name here")

  • Re: Filter People Picker by Department

    Hi @AnnetteM ,

    We really understand that you have more than one issue need to be solved today and we are surely happy to help you with those, but to better focus on the new problem and ensure the service quality, we would advise you to create another ticket on the issue. It can also help us to get the case better recorded and let Microsoft know what you have been through clearly. Thank you so much for your understanding. 

    Best Regards,

    Dezhi

  • AnnetteM Profile Picture
    AnnetteM on at
    Re: Filter People Picker by Department

    Thanks for the update. Your solution works! I do have a follow-up question, however. I show a save button on the form that is visible if the forms.unsaved value is true. The minute I made the items property of the choice field a filter of the Office365 users to list only folks in a department, the form.unsaved property changed to true -- making it appear like all of the records shown in the form are unsaved. Is there a way to get around this?

  • Re: Filter People Picker by Department

    Hi @AnnetteM ,

    Do you want to update the SharePoint person column with data from Office365Users.SearchUser?
    Their data structures are different, so you should override the update property.
    vdezhilimsft_0-1668674202715.png
    vdezhilimsft_1-1668674202716.png

    Best Regards,

    Dezhi

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,526

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,907

Leaderboard