cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
schuess
Level: Powered On

Show preloader while gallery is retrieving data.

I would like to show a preloader while my BrowseGallery is retrieving items from a SharePoint LIst. I referrenced this post https://powerapps.microsoft.com/en-us/blog/ux-patterns/ however I am not making a custom api call. So i am not sure what to use as my trigger between Show True and Show False. THanks - schuess

UpdateContext({showLoader:true});???????;UpdateContext({showLoader:false})
4 REPLIES 4
Power Apps Staff carlosag
Power Apps Staff

Re: Show preloader while gallery is retrieving data.

Could you share what your current expression looks like on the "Items" property of the Gallery?

You could collect into a collection in the middle of that expression, but it depends on the complexity of your expression and the number of rows that you expect to be able to load. For example, Gallery supports pagination autmatically and so if you are expecting more than 500 rows to come from your query then it would not be advisable to do that since Gallery would maginate incrementally as users scroll the gallery.

On the other hand if you don't expect more than 500 records coming, you could just insert in between your UpdateContext calls something like:

ClearCollect(LocalCollection, <here the same expression used in your Gallery>)

 

and bind the Gallery to LocalCollection instead of the data source directly.

Highlighted
schuess
Level: Powered On

Re: Show preloader while gallery is retrieving data.

This is a small and simple gallery.

 

Sort(If(IsBlank(TextSearchBox2.Text), SilentAuctionItems, Filter(SilentAuctionItems, TextSearchBox2.Text in Text(Title))), Title, If(SortDescending1, SortOrder.Descending, SortOrder.Ascending))

I am not expecting more than 500 rows. I am a beginner btw.

 

thanks

Fields
Level: Powered On

Re: Show preloader while gallery is retrieving data.

Is there any solution for this?

 

jc_ec
Level: Powered On

Re: Show preloader while gallery is retrieving data.

I would also like to bump this thread 🙂

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (6,180)