cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Super User
Super User

Loadingspinner Details

My experience with Loadingspinner is that it seems to only work like it is an "OnVisible" action, but not on initial load.  When I load my app, it goes right to a screen with my table.  You watch the table update... no spinner.  If I depart from that screen, and then Back() to the screen with the table, there is a spinner.  I was hoping for more.

 

My next question, I would like to invoke the spinner manually.  I want to pick a button to refresh the tables, and invoke the spinner.  I know I can make one manually, but it is a pain with the complexity of my current screen to make all of the needed variable changes to turn it on/off.  Especially when the spinner works the way I want it too, when its done after a Back() command.  Any ideas?

1 ACCEPTED SOLUTION

Accepted Solutions
BrianKnight
Level 8

Re: Loadingspinner Details

I just created a video last week on the loading spinner. I think this should answer your questions showing the two ways to create them: https://powerusers.microsoft.com/t5/Community-Video-Gallery/Creating-a-Loading-Spinner-in-PowerApps/...

 

If it doesn't just shoot me a note. 

Brian

10 REPLIES 10
BrianKnight
Level 8

Re: Loadingspinner Details

I just created a video last week on the loading spinner. I think this should answer your questions showing the two ways to create them: https://powerusers.microsoft.com/t5/Community-Video-Gallery/Creating-a-Loading-Spinner-in-PowerApps/...

 

If it doesn't just shoot me a note. 

Brian

Super User
Super User

Re: Loadingspinner Details

@BrianKnight,

 

Yessir, I have used that method.  That is more complex that I want, if the stock spinner would work as I think it should.  I have many objects updating.  I know how to do it that way, I was hoping to keep it simple.  Thank you.

BrianKnight
Level 8

Re: Loadingspinner Details

Yup, that would make sense! It does appear that the existing loader behavior built in is only available on load of the screen as it gathers the intial data so it's not as simple as we would all want to accomplish your goal. Sorry to not have better news!

Super User
Super User

Re: Loadingspinner Details

Yea, i figured.  I think I will have to use three variables... wait until all data sources are updated, and tables/images are updated.  When they are all flipped to 'true', it will trigger off the spinner.  That will be a pain, but doable.

 

Thanks again.

Super User
Super User

Re: Loadingspinner Details

@BrianKnight,

 

How do you suggest updating context variables when the "item" control updates due to a dropdown change?  You cannot put an update context sanwitch around the item filter.  I dont know what can trigger the completion of the gallery update.  I have used a timer is such cases, but you either overshoot or undershoot the time needed.  It just doesnt work that well.

bentonepi
Level: Power Up

Re: Loadingspinner Details

I built the basic "App from Data" then customized it with about 10 editable forms on the EditScreen. When I try to add a new record from the BrowseScreen, there is a big delay. I tried both methods of Loading Spinner (the built-in and the Image). In both cases, the delay occurs before the Loading Spinner appears. In fact, it doesn't appear at all, since once the delay is over, the screen transition takes place instantaneously.

 

Here are the relevant parts of my code:

 

BrowseScreen.OnVisible: Set(vis_loading,false)

 

BrowseScreen.AddRecordIcon.OnSelect: 

Set(vis_loading,true);

Set(NewFormCheck,true);

Navigate(EditScreen, ScreenTransition.None)

 

EditScreen.OnVisible: 

If(NewFormCheck,

Set(CurrentLat,Location.Latitude);
Set(CurrentLong,Location.Longitude);

NewForm(basics_demo_form);
NewForm(basics_location_form);
EditForm(basics_demo_form)
)

 

Note that I am not editing all 10 forms when AddRecordIcon is clicked, or when EditScreen is loaded. I also initialized the Defaults as global variables for the forms, so PowerApps is not having to make a connection every time the screen is loaded.

 

I checked the logic on the Image method - if I set the global variable 'vis_loading' to 'true' when pressing the 'add record icon' and I have a label on the EditScreen with the text equal to vis_loading boolean, the label changes to true. It just doesn't change to true until after the delay, i.e. once the screen transition takes place.

I also checked that if I remove the Navigate(EditScreen,ScreenTransition.None), there is no delay before the Loading Spinner is visible. And if I remove the 10 editable forms from the EditScreen, the delay mostly goes away. It appears that navigating to the screen with lots of editable forms is introducing a delay that is not amenable to Loading.Spinner.

 

Suggestions on how to make the Loading Spinner work?

Super User
Super User

Re: Loadingspinner Details

@bentonepi ,

 

I'm still not using the loadingspinner action.  I have an animated gif that I toggle the Visible control with context variables.  I turn it on with an onselect command, then turn it off at the end of whatever statement is running my refresh, or whatever else is going on.  

 

If you are sending something out to a flow, you can use Respond to Powerapps action, which will delay your powerapp until the flow returns a value... or completes if you leave the respond action blank.  Then you can toggle your spinner off when the flow has completed.  

 

My luck with the built in tool is just not that great.

 

Good luck!

bentonepi
Level: Power Up

Re: Loadingspinner Details

@martinav 

Thanks, martinav. It doesn't work with an animated gif. I'm not sending anything to a flow, just navigating to another screen.

See the gif for the delay - it takes a while on the computer and even longer on a phone.

Highlighted
Super User
Super User

Re: Loadingspinner Details

@bentonepi ,

 

I have some ideas on this.  It will be later tonight or tomorrow.

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

FifthImage

Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!

Users Online
Currently online: 107 members 4,200 guests
Please welcome our newest community members: