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 / Hide one of the galler...
Power Apps
Answered

Hide one of the gallery for some users

(0) ShareShare
ReportReport
Posted on by 2

I have 3 gallery on the screen.

 

I want to hide one of the gallery from all users other than 3 users (whose email address I am having)

 

I am aware that the code to be applied on the visible property of gallery for it, but unaware of the correct code.

 

kindly guide by an example.

 

Categories:
I have the same question (0)
  • Verified answer
    Ami K Profile Picture
    15,687 Super User 2024 Season 1 on at

    @MIA27 one method:

     

    User().Email exactin [
     "name2@abc.com",
     "name2@abc.com",
     "name2@abc.com"
    ]
    
  • MIA27 Profile Picture
    2 on at

    Dear Mr. Imran,

    Thank you for your advise, I am in process to implement your advised code and check.

     

    BUT idea came to my mind, Instead of hard coding, tomorrow that user may leave and another may join, so it will be required to edit in the App, so get rid of this re-work, I am planning to make a table like below and then link the code that 

    IF the email address exist in the table and MATCHES with the Current USER , it will view ELSE it will HIDE the gallery

     

    Please advise, we need to change to code to DLOOKUP or need other method coding?

    Please advise the better way to handle this situation.

     

    RowNoUserNameUserDivisionUserBranchUserEmail
    1AaaaHEDSite-A-Branchaaa.com
    2BbbbHEDSite-A-Branchbbb.com
    3CccccHEDSite-A-Branch

    ccc.com

     

     

     

  • Chitrakant Profile Picture
    4 on at

    Hi MI27,

     

    In that case you use - If(!IsBlank(lookup(Table_name,UserEmail=User().Email)),True,false)

    Hope this code will work & accept this reply as solution , if it work.

     

    Thanks,

    Chitrakant 

  • Verified answer
    Ami K Profile Picture
    15,687 Super User 2024 Season 1 on at

    @MIA27 - for that scenario you can simply apply the below to the Visible property of the Gallery:

     

    !IsBlank(
     LookUp(
     'Your People Table',
     UserEmail = User().Email
     )
    )

     

    @Chitrakant - there is no need use the IF function to return true or false if the property or control already expects a boolean.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 547

#2
WarrenBelz Profile Picture

WarrenBelz 444 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 322

Last 30 days Overall leaderboard