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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Filter all gallery val...
Power Apps
Answered

Filter all gallery values if the user is the admin of the app

(0) ShareShare
ReportReport
Posted on by

Hi Team,

 

It's been a while, I am seeking assistance if it's possible to filter gallery based on user security level? Like if the app will detect that the user viewing the app is the admin, he/she will see all gallery values? 

Kindly see screen shot of my code on start.

 

Thank you!

 

nmlsanmiguel_0-1690253936079.png

 

Categories:
I have the same question (0)
  • narayan225 Profile Picture
    2,547 Super User 2025 Season 2 on at

    @nmlsanmiguel 

    If you have a separate list for security privileges, you can use If condition for Filters.

    If(LookUp(SecurityTable,Email = User().Email,Role) = "Admin",DataSource,Filter(filer condition for other users))

    Here if the role is Admin from SecurityTable that contains email and roles, it will display whole datasource but if the role is other than Admin, you can specify your own filter.

     

    Cheers!

  • nmlsanmiguel Profile Picture
    on at

    Hello, Thank you for your answer. I tried the logic statement above,

    but lookup returning blank, idk why it returns blank when in MS List it has true value. Thank you!

     

    nmlsanmiguel_0-1690258946753.png

    nmlsanmiguel_1-1690259074611.png

     

     

  • Verified answer
    narayan225 Profile Picture
    2,547 Super User 2025 Season 2 on at

    @nmlsanmiguel 

     

    Where is varUsers defined? I suggest you use User().Email instead.

     

    Cheers!

  • nmlsanmiguel Profile Picture
    on at

    Hello, it's already working I just forgot to click the run on start button that's why it's return value is null.

    nmlsanmiguel_0-1690267381646.png

     

    Thank you

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard