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?
Solved! Go to Solution.
@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.
Proud to be a Flownaut!
Follow me on Twitter at @QG_LeeJHarris
Or on LinkedIn at in/leejharris
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})
Proud to be a Flownaut!
Follow me on Twitter at @QG_LeeJHarris
Or on LinkedIn at in/leejharris
@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?
@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.
Proud to be a Flownaut!
Follow me on Twitter at @QG_LeeJHarris
Or on LinkedIn at in/leejharris
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
User | Count |
---|---|
205 | |
183 | |
71 | |
37 | |
33 |
User | Count |
---|---|
343 | |
274 | |
118 | |
76 | |
58 |