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 / Making buttons disappear
Power Apps
Answered

Making buttons disappear

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

So I have this gallery with a lot of items, and each item has 2 buttons that change visibility depending on the other one. How can I make it so that when I click on one of them (doesn't matter which) I make all buttons of all the gallery items disappear too while the app loads so people when using the app don't spam the buttons while it is loading?

Categories:
  • LeeHarris Profile Picture
    1,026 on at

    Hi @Anonymous 

    You can create a property that you can update in the OnSelect of the gallery buttons. Add the following function to the button's OnSelect.

    UpdateContext({GalleryButtonsVisible:false})

    Then add a check (in addition to your existing visibility conditions) of the GalleryButtonsVisible variable to the button's Visible property.

    Once your loading is completed, simply update the variable again to true using UpdateContext({GalleryButtonsVisible:true})

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @LeeHarris 
    But when I initially load the app the variable isn't neither true or false and I can't use: UpdateContext({GalleryButtonsVisible:true}) on the OnStart funtion of the app, so how do I resolve this problem?

  • Verified answer
    LeeHarris Profile Picture
    1,026 on at

    @Anonymous 

    Are you unable to use UpdateContext in the OnStart of you app as your gallery controls are on a different screen?

    If this is the case then use Set(GalleryButtonsVisible, true) to define the variable in a global scope. You should then be able to access it from anywhere in your app. You would also need to use the Set(GalleryButtonsVisible, false) function when clicking the buttons in the gallery.

     

     

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 383 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 356

#3
WarrenBelz Profile Picture

WarrenBelz 232 Most Valuable Professional

Last 30 days Overall leaderboard