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

Timer working on one screen but not another

Hello,

 

I have created a 'test' screen to work out how a start the timer to run and after a certain amount of time to sound an alarm and display message.  Within the message there is a reset button that when selected will restart the process.   This works fine on this a blank screen.

 

I then copied the 'functions' to the screen in my app where i want this process to work.

The only change  made is I copied the 'Start' formula into the formula of the action button on the new screen.

 

Also the screen I inserted a Gallery and all 'functions' are within the remit of the Gallery. Would the variable have to be different??  Variable used is UpdateContext.  I do additional formulas associated with the 'action' button which is a patch formula.

 

Any ideas will be most welcome

 

After trying different formulas, I clicked on the 'timer' which started it off.  I let it run it's time, 1min which when reached set of the alarm sound and displayed the message.  So it seems the link between the submit button to the timer function is where the problem lies.  Not sure if this will help??

 
 
 
5 REPLIES 5
Highlighted
Community Champion
Community Champion

Re: Timer working on one screen but not another

Hi @ClarkyPA365 ,

Before you try anything else, change the Variables to a Global types - Set(Variable,Value).

If this does not solve the issue, I happy happy to help you explore further.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Highlighted
Resolver I
Resolver I

Re: Timer working on one screen but not another

@WarrenBelz,

Hi Warren,  

Hope your safe and well.

I've changed all the variables to Global but still not working as it does in my test screen??

Out of interest. Why would it need to be changed from Global to Local variable? 

 

 

 

 

Highlighted
Community Champion
Community Champion

Re: Timer working on one screen but not another

Thanks @ClarkyPA365 ,

I have always had issues with Context Variables on timers, so use Global. Now I have your code, try initiating the Variable first

Set(TimerStart,false);
Set(TimerStart,true)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Highlighted
Resolver I
Resolver I

Re: Timer working on one screen but not another

Hi Warren @WarrenBelz 

 

I've attached a word doc showing the screen and the formulas for each function button.

 

When I select the timer is starts and when reaches 10secs the alarm rings and the warning box becomes visible. Pressing the Reset button.  

When selecting the 'update information' button this doesn't start the timer.

 

Have a put the formula you previously provided in for the wrong function?  I have tried it in the 'Reset' function

 

Highlighted
Community Champion
Community Champion

Re: Timer working on one screen but not another

Hi @ClarkyPA365 ,

Sorry I missed you post in my feed.

A Timer has a Start value, which you can set on a Variable. It often needs initiating (hence the setting to false and back to true). You have mentioned the Reset - this is whether the time resets. You need the Start code in Start.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,244)