cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Sam4
Resolver I
Resolver I

Timer to lock 2 controls in different screens

Hi, I'm having some problems with the timer control and not sure what I'm doing wrong.

 

I have one app with two screens: 

Screen1 has a Timer element and a button doing the following:

Set(gblLock,true);

Set(gblDuration,10000);

Navigate(Screen2)

 

Timer Control has the following properties:

Start: gblLock

OnTimerEnd: Set(gblLock,false);

Duration: gblDuration

 

Screen2 has 2 labels, one  displaying Timer1.value and the other displaying the value of gblLock.

 

What I want to achieve is, when I click the button in Screen1, start the timer counting to 10, be redirected to Screen2 and see the value of the timer in real time and when the count arrives to 10, see how the variable gblLock change from true to false.

 

However, when I am redirected to Screen 2, I see Timer1.value = 50 and gblLock = false immediately. I can see for a ms how it changes to true and quickly to false, but it is not counting the 10 sec expected (and I make sure I've put 10sec=10000)

 

If seems for some reason the timer stop working when navigating to other screens?

 

Any ideas why this can happened?

 

Many thanks 

 

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@Sam4 

A thought...Make sure that you have turned the "Auto pause" off for the timer control.  Otherwise it will stop and end when the screen is changed.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

2 REPLIES 2
RandyHayes
Super User
Super User

@Sam4 

A thought...Make sure that you have turned the "Auto pause" off for the timer control.  Otherwise it will stop and end when the screen is changed.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
Sam4
Resolver I
Resolver I

@RandyHayes Many Thanks! I didn't check that out. That was the issue, and now it is solved. Thanks!

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (3,320)