cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate III
Advocate III

Elements are visible while their visible property is evaluated

I have a BrowseGallery with some indicators (buttons, images or icons) whose Visible property depends on a lookup value.

My problem is that all of them show while the gallery is loading, and then disappear based on the visible formula evaluation.

Is there a way to hide them until the gallery is loaded?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Advocate IV
Advocate IV

Re: Elements are visible while their visible property is evaluated

I'm not sure if it's exactly what you need, but maybe you could use a construction like this.

 

Set the Visible property of the elements you want hidden initally to 'showControls && (your additional visibility logic)'

 

Then, in the OnVisible of your page, use:

UpdateContext({ showControls: false });
ClearCollect( galleryItems, /*(load logic for your gallery items)*/ );
UpdateContext({ showControls: true });

 And use the 'galleryItems' collection as source for your gallery.

View solution in original post

3 REPLIES 3
Highlighted
Advocate IV
Advocate IV

Re: Elements are visible while their visible property is evaluated

I'm not sure if it's exactly what you need, but maybe you could use a construction like this.

 

Set the Visible property of the elements you want hidden initally to 'showControls && (your additional visibility logic)'

 

Then, in the OnVisible of your page, use:

UpdateContext({ showControls: false });
ClearCollect( galleryItems, /*(load logic for your gallery items)*/ );
UpdateContext({ showControls: true });

 And use the 'galleryItems' collection as source for your gallery.

View solution in original post

Highlighted
Advocate III
Advocate III

Re: Elements are visible while their visible property is evaluated

@MrNappathanks for the prompt response. This should do the trick, and I'll add a loading spinner. Will let you know after the Easter Break.

Highlighted
Advocate III
Advocate III

Re: Elements are visible while their visible property is evaluated

@MrNappa I implemented it and it works to some extent: the images still pop up for a short moment when the gallery initially loads, and then disappear all at once before the desired ones come back individually, which is slightly better than before. Thanks again!

Helpful resources

Announcements
Ignite

Microsoft Ignite

This will be a conference that you do not want to miss!

secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,064)