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/show Galleries On...
Power Apps
Answered

Hide/show Galleries OnSelect

(0) ShareShare
ReportReport
Posted on by 6

I have 2 Galleries... they are corresponding to 2 other galleries themselves.

 

Analysts ----> White gallery

Mentees ----> Green gallery

OnSelect, i want to hide green gallery when i select a person on Analysts gallery and hide white gallery if i select a person on mentees gallery. I tried many different things with no good results. Please help. 

Screenshot 2023-10-18 151824.png
Categories:
I have the same question (0)
  • Verified answer
    SpongYe Profile Picture
    5,909 Super User 2026 Season 2 on at

    Hi @williamsffc 

     

    Use a variable to control the visibility of each gallery, and then set the variable to true or false depending on which gallery item is selected. For example:

     

    On the screen where your galleries are located, set the OnVisible property to 

    UpdateContext({ShowWhite: true, ShowGreen: false})

    . This will initialize both variables to true when the screen is loaded.

     

    Set the Visible property of the White gallery to

    ShowWhite

    and the Visible property of the Green gallery to

    ShowGreen

    .

    On the OnSelect property of each item in the Analysts gallery, set it to 

    UpdateContext({ShowWhite: true, ShowGreen: false})

    This will show the White gallery and hide the Green gallery when an item is selected.

    On the OnSelect property of each item in the Mentees gallery, set it to 

    UpdateContext({ShowWhite: false, ShowGreen: true})

    This will show the Green gallery and hide the White gallery when an item is selected

     

    If you have any questions or feedback, please let me know. Have a great day! 😊

    -----------------------
    PowerYsa Power Platform Enthusiast [LinkedIn] | [Youtube]

    I love to share my knowledge and learn from others. If you find my posts helpful, please give them a thumbs up 👍 or mark them as a solution ✔️. You can also check out my [@PowerYSA] for some cool solutions and insights. Feel free to connect with me on any of the platforms above. Cheers! 🍻

  • williamsffc Profile Picture
    6 on at

    Thank you so much! This worked for me. 👏👏👏👏
    - I was using UpdateContext but i was missing a couple of things. 

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 329 Most Valuable Professional

#2
11manish Profile Picture

11manish 209 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 179

Last 30 days Overall leaderboard