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 / Filter combobox based ...
Power Apps
Answered

Filter combobox based on 'User Access Level',list

(0) ShareShare
ReportReport
Posted on by 82

Dear experts 

I am building an application linked to two SPL Mail lists for the database and the other list for user access live 

in the main gallery of the application, I have a combo box for departments

My goal was to show only the department that belongs to the user in the department combo box based on the access level list.

The fourmla am using 

On start 

ClearCollect(colDep,SortByColumns(Distinct(Expenses,Department),"Result"));

"Expenses is the main list" 

ClearCollect(colUser, Filter('User Access Level', UserName = User().Email));

"The User Access Level is  the list of the users containing the user name column which email and another column for user department 

 

For the department combobox item : Filter(colDep,Result exactin colUser.Department)

 

It works fine but I want to keep the the user for Management department to see all departments 

 

Thanks a lot 

Categories:
I have the same question (0)
  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @mohamednasr

    Could you please share a bit more about you need?

    Do you want to display all the departments for a special department?

     

    You could set the Items property of the ComboBox as below:

    If(User().Eamil in Filter(colUser,Department=Management).UserName,colDep,Filter(colDep,Result exactin colUser.Department))
  • mohamednasr Profile Picture
    82 on at

    @v-qiaqi-msft 

    Thanks a lot and sorry for the late replay 

    I have a SharePoint list for user access right this list contains two columns one for user email and the other column for the department. 

     

    I filter by the department in my gallery using a combo box 

     

    All I need that each user to see their department only in the combo box based on the access right they have in the SharePoint list 

     

    Except for some users who must have access to all departments which I call them management in the access right list in the Department column 

     

    I hope i am more clear now 

     

    Thanks a lot 

  • mohamednasr Profile Picture
    82 on at

    Hi @v-qiaqi-msft 

    It works perfectly thanks a lot.

    I have tested with different email accounts and works fine but I notice two things, first when I log in from my account (The owner of the app) I don't see any department in the combo box even after I put my email in the access lever list. but for other email accounts which are not owners works fine.

     

    And for the user who has access to only one department if I press on the "x" next to the department name in the combo box it goes out of the filter mood and shows all the data for other departments, do you have a solution for that 


    Thanks a lot 

     

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 392 Most Valuable Professional

#2
11manish Profile Picture

11manish 181 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 112 Super User 2026 Season 2

Last 30 days Overall leaderboard