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 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 Moderator 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 Moderator 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

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 June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 337 Most Valuable Professional

#2
11manish Profile Picture

11manish 173

#3
Valantis Profile Picture

Valantis 86

Last 30 days Overall leaderboard