cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
RTW
Level: Powered On

How To: Filtering People Picker

Not a question, but a tutorial. I'm not sure if this is the best way but I've seen a few people ask to be able to filter the people picker to a certain department, and I haven't really seen much that works. This is a bit of a MacGuyvered solution, but it works for me at least. There are a few parts to it.

 

I wanted to create an app that would allow management to easily log sick calls from our associates. Our organization has many, many locations nation wide, but I wanted the app to only select people from our office. The sick calls are stored in Sharepoint on a list called "SickCalls", and there is a person feild that I call "Employee." This is how I managed to get the results I wanted.

 

1) Create a list of people you want to appear in the dropdown.
- In my case, I work for an orgnaization with many locations across the country. I wanted only people from my location
- I create a flow that maintains a list of everyone in the location. It starts by adding the director, and then every time someone is added, it adds whoever reports to them. It goes by down the list recusrively until no one is left.
- This runs on a schedule so that it is automatically updated
- For the purposes of this post, I'm calling this list "Org"
- The list has two columns Title, which is copied from the display name and the people feild
2) On the form, create a custom DataCard
3) Create a combobox
- Set the Items property to Sort(Org.Title, Title)
- List should be searchable, and only one person can be selected
- We'll call this ComboBox "Person"
3) Add a default DataCard for the "Employee" column for the "SickCalls"
- Set it to advanced
- Set the "Update" property to the following

{ 
  DisplayName:User().FullName,
  Claims:"i:0#.f|membership|" & Lower(LookUp(Org, Title = Person.Selected.Title , Associate.Email)), 
  Department:"", 
  Email:LookUp(Org, Title = Person.Selected.Title , Associate.Email), 
  JobTitle:"", 
  Picture:""
}

- Set "Visible" to false

 

Its not an elegant soliution by any means, and it may not work for all applications, but I have found it useful.

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: How To: Filtering People Picker

Hi @RTW ,

Thanks for your sharing. I would share your solution with my colleagues.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Community Support Team
Community Support Team

Re: How To: Filtering People Picker

Hi @RTW ,

Thanks for your sharing. I would share your solution with my colleagues.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

Top Kudoed Authors
Users Online
Currently online: 535 members 4,559 guests
Please welcome our newest community members: