cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate II
Advocate II

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
Highlighted
Community Support
Community Support

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
Highlighted
Community Support
Community Support

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (8,547)