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 / How to Make Timer End ...
Power Apps
Unanswered

How to Make Timer End Early if Condition Met

(0) ShareShare
ReportReport
Posted on by 35

All,

Looking for a way to make a timer fire the "OnTimerEnd" event early. The problem I am trying to solve: I have created a loading screen that pre-loads all data into Collections, and also checks the app version against a remote share point list in order to verify they are running the latest version and forcing them to update if they are not.  Right now this process can take anywhere between 1-3 seconds depending on connectivity from a mobile device. I have 5 second timer that navigates to the home screen upon Timer End.

 

However, this app may be opened many times each day and I'd like to configure it so that instead of having to wait the full 5 seconds, if load finishes after 1 second it goes ahead to the main screen to save my users some time throughout the day and make it more user friendly.

 

I've tried the following:

 

1. I had two timers, one for my full load time and one that checked every 750ms to see if the conditions had been met and if they had to go to the load screen. The "early detection" timer was set to auto pause. However, I ran into an issue where when the condition would be met and the user would navigate to the main screen the timer would continue to run in the background even though auto pause was selected. This meant if a user selected a button from the main screen it  would load that screen and then immediately navigate to the home screen again (each time the timer was firing the OnTimerEnd event).

 

Setting it to auto pause or setting an update context variable and placing that in the "start" field of each timer did not seem to resolve this. (Interesting note, this didn't occur on the web player, only on mobile version).

 

 

Any ideas on how to accomplish what I'm trying to do?

 

 

Categories:
I have the same question (0)
  • GarethPrisk Profile Picture
    2,828 on at

    Instead of depending on a Timer, would you want to consider moving to an explicit loading pattern? Meaning, instead of having an arbitrary loading time, could you check more explicitly that your loading functions have completed, before navigating the user? Ultimately this solves both quick-loading and slow-loading scenarios appropriately for the user, based on their specific scenario.

     

    There are a few suggestions

    • Add a loading/progress/blocking mechanism to show the user that things are happening
      • Rotate an Icon, using a Timer to determine the rotation
      • Simple loading animation from loading.io
      • Increment a 'progress bar' using a Collection of items which are loaded
    • Determine the progress of the load
      • If you are running functions in series, then simply Navigate after they are done
      • If you are running functions Concurrently, then track each branch in a Collection
    • Navigate the user
      • Either an explicit Navigation after things are done
      • Select a Button with the Navigation function (or anything else)
      • Trigger a Timer, and Navigate onTimerEnd
  • WO1 Profile Picture
    35 on at

    I would definitely be interested in that. I was originally doing that in the following method (Without a timer) in OnVisible of Screen.

     

    1. Load Collections

    2.  Load Version Number

    3. Do Comparison of Version Number (local vs retrieved).  Navigate if appropriate, otherwise show error.

     

    This worked for the most part, unless the server was not reachable, then it would hang. Maybe I need to force a timeout on my retrieval and set a variable or something if its forced exit?

     

  • GarethPrisk Profile Picture
    2,828 on at

    Handling the 'hanging' perception, or slowness, for Users is an important consideration. As long as they believe something is happening, and in an appropriate amount of time, then they will happily wait.

     

    PowerApps does, unfortunately, give the impression of being frozen when it has a long-running process. Some will cause even an animated GIF to freeze in the app, such as a complicated ForAll statement. My example below shows this when it gets to the point of creating/loading a matrix of records - that ForAll function is relatively intense, and even an animated image locks up.

     

    PowerUsers - Loading Animation.gif

    Here I combined a loading spinner Image, and a pattern of collecting a 'progress' record in each loop of a ForAll function. The width of a Shape increments as a percentage of ( CountRows / Total ).

     

    How are you doing the License retrieval? It may be possible to introduce an error-handling mechanism, but limited connectivity/timeouts are usually not easily handled in an app.

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 214 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 185

Last 30 days Overall leaderboard