Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building 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

 

  • nmlsanmiguel Profile Picture
    on at
    Re: Filter all gallery values if the user is the admin of the app

    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

  • Verified answer
    narayan225 Profile Picture
    2,449 Super User 2025 Season 1 on at
    Re: Filter all gallery values if the user is the admin of the app

    @nmlsanmiguel 

     

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

     

    Cheers!

  • nmlsanmiguel Profile Picture
    on at
    Re: Filter all gallery values if the user is the admin of the app

    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

     

     

  • narayan225 Profile Picture
    2,449 Super User 2025 Season 1 on at
    Re: Filter all gallery values if the user is the admin of the app

    @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!

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,635 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,997 Most Valuable Professional

Leaderboard