web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Showing loading popup ...
Power Apps
Answered

Showing loading popup before executing other code.

(0) ShareShare
ReportReport
Posted on by 35

Hey all,

 

I have some variables that toggle the visibility of some loading gifs that I set before and after blocks of text. Most of the time it works well, but in a couple cases the spinners never show up. I think that the code begins processing before it actually sets the variables to the values. Here's one such block of code.

 

 

Set(LoadingVisible, true);
Set(PopUpVisible, true);


//Reset the Amounts
ForAll(Filter(colFutLineItems, IsBlank(UnsavedAmount) || Round(UnsavedAmount,0) <> Round(TotalAmountForecast,0)) As FutQLineItems,
Patch(colFutLineItems,FutQLineItems,{UnsavedAmount: Coalesce(FutQLineItems.TotalAmountForecast,0)})
);



Set(LoadingVisible, false);
Set(PopUpVisible, false);

 

 

It works - like it does its job - but it doesn't seem to allow the variables to properly set before it dives into the ForAll loop (which stalls everything for 3-5 seconds). Is there a way for me to force these variables to be evaluated fully before moving on to the ForAll? Thoughts?

Categories:
  • JR-BejeweledOne Profile Picture
    5,836 Moderator on at

    I haven't done this myself, but you might find some ideas or even a solution here:

     

    https://youtu.be/UWy5I_MuIgU

  • FlowHawkSlalom Profile Picture
    35 on at

    Thanks for the response. I do know how to show a popup for a loading spinner and it's worked many times, but in this and a few other cases it doesn't show the spinner before it starts calculating the block of code.

  • JR-BejeweledOne Profile Picture
    5,836 Moderator on at

    I wonder if you could use the timer function to delay it calculating the code block?

  • FlowHawkSlalom Profile Picture
    35 on at

    It's a good thought. If I use a timer then I will always be adding loading time to the solution, which I don't like. I'm sure I could also throw my block of code on a button and have the button select a button, but I don't want to do those things if I don't have to. I think it unnecessary complicates the solution. Hopefully someone can let me know what it's functioning the way it is and if there is a change in code that would force the execution in order.

  • Verified answer
    FlowHawkSlalom Profile Picture
    35 on at

    Here's how I solved my problem, but it was not elegant: https://youtu.be/5wiYzIyOrf8

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 236 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 207 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 169

Last 30 days Overall leaderboard