Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

Filtering certain dropdown item

(0) ShareShare
ReportReport
Posted on by 9

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  

Categories:
  • joelgriffin97 Profile Picture
    joelgriffin97 9 on at
    Re: Filtering certain dropdown item

    Thanks! I ended up creating a reference SPO list and that has worked. Thanks again

  • Verified answer
    leonsig93 Profile Picture
    leonsig93 229 on at
    Re: Filtering certain dropdown item

    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.

  • joelgriffin97 Profile Picture
    joelgriffin97 9 on at
    Re: Filtering certain dropdown item

    Thanks for the reply. 

     

    Yes it's just a people picker column, there aren't any flags against it to indicate a manager

  • leonsig93 Profile Picture
    leonsig93 229 on at
    Re: Filtering certain dropdown item

    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?

     

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,475

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,767

Leaderboard