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 Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,336)