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.
WarrenBelz
982
Most Valuable Professional
MS.Ragavendar
396
Super User 2025 Season 2
Power Apps 1919
356