web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Manager should be filt...
Power Apps
Answered

Manager should be filter as per user login

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello Everyone,

 

I am developing app where manager will get filter as per user login so I have develop database as person type and in PowerApps I am using dropdown where name of managers will get filter as per user login and also I have created employee column in database where particular manager is allotted to employees.
 Eg : A employee is allotted x manager B employee is allotted y manager so whenever A employee login x manager should be automatically filter in dropdown using filter function.

Regards,

Sagar Shah

Categories:
  • mdevaney Profile Picture
    29,993 Moderator on at

    @Anonymous 
    Suppose you have a table called 'Employees List' with 2 columns of 'Person Type'.

     

    Employee Manager
    Employee A Manager A
    Employee B Manager A
    Employee C Manager A
    Employee D Manager B
    Employee E Manager B


    Put this code in the Onstart property of the App to get the Manager's email

     

    Set(varUser, User().Email)

     


    Then use this code in the Items property of the Combobox used to select an employee

     

    Choices('Employees List'.Manager)

     

     

    Put this code in both the DisplayFields and SearchFields property of the ComboBox.

     

    ["Display Name"]

     


    Finally, use this code in the DefaultSelectedItems property of the ComboBox

    LookUp('Employees List', Employee.Mail = varUser, Manager)



    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • Verified answer
    v-yutliu-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

    Do you want to filter manager based on employee ?

    Could you tell me
    1)is your data source sharepoint list?

    2)are manager and  employee field both user type?

    3)whether these two fields allow multiple value?

    I assume that you use sharepoint list ,manager and  employee field both are user type, not allow  multiple value.

    Then you should set like this:

    the drop down's Items:

    Distinct(Filter('Employees List', Employee.Email=User().Email),
     Manager.Email)

    Then the drop down will only list the related manager's email.

     

     

    Best regards,

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 352 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 323

#3
Mohsin Ali Profile Picture

Mohsin Ali 226

Last 30 days Overall leaderboard