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 / Remove "All" from the ...
Power Apps
Answered

Remove "All" from the dropdown based on logged in user

(0) ShareShare
ReportReport
Posted on by 82

Dear experts, I added "All" in a dropdown value, the dropdown value is filtering based on logged-in User.

Below are the fourmla I used:

 

onStart ClearCollect(colDep,{Result: "All"}, If(User().Email in Filter(colUser, Department="96 Management").UserName, SortByColumns(Distinct(Expenses, Department),"Result"), Filter(Distinct(Expenses, Department), Result exactin colUser.Department)));

 

Note that the colUser I am using for another SharePoint list for the user's access level contains user Email and Department columns.

 

And for the dropdown Items I use colDep to filter the dropdown according to the above fourmla.

 

My question is how to remove the "All" value from the dropdown if the logged-in user not coming from the '96 Management' department.

 

Note that according to the fourmla above '96 Management' is for users who are able to see all departments, and other users see only the department they have access to, I want to remove "All" for the user who has access to 1 department only.

 

Thanks a lot for your help

Categories:
  • Verified answer
    iAm_ManCat Profile Picture
    18,256 Most Valuable Professional on at

    Hey @mohamednasr 

     

    I think you can use the same logic you have there but apply it to the first item as well like this:

    ClearCollect(
     colDep,
     If(User().Email in Filter(colUser, Department="96 Management").UserName,
     {Result: "All"}
     ),
     If(User().Email in Filter(colUser, Department="96 Management").UserName,
     SortByColumns(Distinct(Expenses, Department),"Result"),
     Filter(Distinct(Expenses, Department), Result exactin colUser.Department)
     )
    );

     

    Cheers,

    Sancho

  • mohamednasr Profile Picture
    82 on at

    @iAm_ManCat 

    Thanks a lot, man, you are amazing, it works perfectly as I wanted exactly. I appreciate your help.

  • iAm_ManCat Profile Picture
    18,256 Most Valuable Professional on at

    Cheers! Happy to help 🙂

    Hope you have a great day

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 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 283

#3
Mohsin Ali Profile Picture

Mohsin Ali 221

Last 30 days Overall leaderboard