Skip to main content

Notifications

Community site session details

Community site session details

Session Id : tFO3+Js88RZZMRHQZwmTKi
Power Apps - Building Power Apps
Unanswered

Custom Loading Spinner

Like (0) ShareShare
ReportReport
Posted on 16 Apr 2019 16:14:28 by 42

Hello,

 

I am using a loading spinner I found on loading.io. I am using a refresh button and my code on it is this...

 

UpdateContext({varLoading:true});Refresh('[dbo].[CPCHeader]');UpdateContext({varLoading:false})

 

My issue is that the update property will make the spinner disappear before the actual refresh goes through. Aside from setting a manual delay of a few seconds on the context variable, is there any way to time that variable closer to the actual refresh speed in order to accurately represent the load?

 

Thanks,

Pat

Categories:
  • wyotim Profile Picture
    2,545 on 16 Apr 2019 at 19:35:45
    Re: Custom Loading Spinner

    So...I just realized that I misread the original post @Pseifert . My apologies for the rabbit trail! Smiley Embarassed If you are looking for a screen-to-screen spinner, my comments on the LoadingSpinner are more relevant. 

     

    However, my comments about calculations and the like are relevant to the use of context variables as triggers. PowerApps can tell if the data is loaded, which will initiate the context variables, but calculations and such are outside of that scope so the expected behaviors don't always happen (i.e. things may appear sooner than expected). You may look at the what is happening throughout your app and see if there are other items you could use as a trigger condition?

  • Pseifert Profile Picture
    42 on 16 Apr 2019 at 19:25:13
    Re: Custom Loading Spinner

    The delay of the spinner displaying has caused me to go another route with a custom spinner. But I will experiment more

  • wyotim Profile Picture
    2,545 on 16 Apr 2019 at 19:25:05
    Re: Custom Loading Spinner

    I couldn't find any docs either. Hopefully they'll show up soon!

     

    One interesting thing: it uses the background image/color from the page you using it on. This allows for showing the user a full screen picture with the spinner if you have an image there, which can provide a nice transition when items load in. 

  • Community Power Platform Member Profile Picture
    on 16 Apr 2019 at 19:13:53
    Re: Custom Loading Spinner

    Nice! I've never tried LoadingSpinner. before. Always wondered what that was for/how it worked.

    Can't find any docs on the feature!

  • wyotim Profile Picture
    2,545 on 16 Apr 2019 at 17:34:19
    Re: Custom Loading Spinner

    You might check to see what the LoadingSpinner property is set to as there are three choices:

    • LoadingSpinner.Controls
    • LoadingSpinner.Data
    • LoadingSpinner.None

    "None" is, of course, to not show the spinner. If you have "LoadingSpinner.Data", you may try "LoadingSpinner.Controls". I switched to it as I was having some of the same issues. My intrepretation was that, while the data was loaded, there were still things like calculations happening which delayed data from appearing. For me, after changing to "Controls" it seemed to not hide the spinner until all items were ready for use. Maybe give that a go?

  • Pseifert Profile Picture
    42 on 16 Apr 2019 at 16:24:11
    Re: Custom Loading Spinner

    Yes, this data is being loading via on-premise SQL server so the load can take a bit, but not always. What I am seeing is that sometimes the spinner goes away before the data is actually refreshed on screen. i.e. a user can click forward prior to all data being fully updated

  • Community Power Platform Member Profile Picture
    on 16 Apr 2019 at 16:21:33
    Re: Custom Loading Spinner

    I've had to use a timer before when refreshing a Gallery. Are you displaying the dbo.data in a 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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,731 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,077 Most Valuable Professional

Leaderboard
Loading started