Hello,
I've created a leave request app using PowerApps but I have been asked to tweak one thing. I have a form where users can request leave, and they have to choose their manager from a dropdown list. At the moment, this dropdown displays all users in the business, but I would like to filter it to only show appropriate users.
For example, I have User 1, User 2 and User 3 - but only User 2 is a manager. Therefore I only want to have User 2 as an option in the dropdown.
The formula I have currently that displays all users is:
Choices([@HolidayRequests].Manager)
Can this be tweaked to only show the users I (as an admin) choose to show?
Many thanks
Joel
Thanks! I ended up creating a reference SPO list and that has worked. Thanks again
Gotcha.
So you'll have to create some sort of reference list to use instead of the current formula. There's a couple ways that you can do that, and some depend on what you have access too.
My personal favorite way of doing that is creating an Office 365 Security Group. You can then use the Office365Groups connector to pull the list and create a collection of the managers from that. The added benefit is that then you can share the PowerApp/SharePoint list directly to the group. Also makes removing them in the future easier since you only need remove them from the Security Group.
If you don't have that kind of access, the simplest way is to create a reference SPO list and create a record for each user that is a manager. Then just collect all the records in there and you can create a single column table of just the managers. Added benefit of this is that you can add any other reference info (like what department they manage) which can let you do some extra stuff if you ever need it.
I just built a leave request app myself and added a column to indicate which contract they managed and if they could approve leave requests (app has other features so approvers vary). So now the app knows who the current user's managers are without the user having to select anything.
Thanks for the reply.
Yes it's just a people picker column, there aren't any flags against it to indicate a manager
It would depend on what you have available on User 2. If you have a flag or some other indicator that lets you know they're a manager, you could create a formula in the App that just filters based on that indicator.
What type of column is Manager? People Picker?