cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
StraighterSwing
Frequent Visitor

Timer stops counting down when browser tab focus changes

I have a timer on my PowerApp.  If I have 2 or 3 other tabs open, if the timer is running and I change tabs, the timer stops. It won't continue so I can do other things in other tabs while it's running.

However, if I have the PowerApp in its' own browser window, it will run just fine if I'm working in another browser session.

 

How can I make the timer always continue to run regardless of if I'm working in another tab?

 

I tried to include a video of the problem but I cannot upload mp4 files.

11 REPLIES 11

Hi  @v-siky-msft,

The timer doesn't start when I click it. 

Is there any other setup needed to make the below work? I tried replicating the GIF in a new/blank canvas but it doesn't start when I click on it. 😞

1. Set Duration: 1000

2. Set OnSelect: 

 

Set(StartTime, Now());
Set(Now, Now())

 

3. Set OnTimerStart: 

 

Set(Now, Now())

 

4. Set Text: 

 

 Text(Time(0, 0, DateDiff(StartTime,Now,Seconds)), "[$-en-US]hh:mm:ss")

 

ramanujama
Helper I
Helper I

A quick workaround helped me solving the issue:

OnTimerStart: Set(Now, Now())

AutoStart: true
OnSelect: Set(oldTime, Value(Last(FirstN(Split(Timer1.Text,":"),1)).Result) * 60 * 60 + Value(Last(FirstN(Split(Timer1.Text,":"),2)).Result *60) + Value(Last(FirstN(Split(Timer1.Text,":"),3)).Result));
Set(Now,Now());

Text: Text(Time(0, 0, (Self.Value * 0 /1000) + DateDiff(Now,Now(),Seconds) + oldTime), "[$-en-US]hh:mm:ss")

To reset timer:
Reset(Timer1); Set(oldTime,0); Set(Now,Now());

Note: Without Self.Value in the expression, timer is not working

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

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.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (2,396)