cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ShaneITAutomate
Helper V
Helper V

Timer Countdown on timer end (on timer start) error

Hi,

 

I have a timer that ive changed to countdown, and the on timer end code is

 

 

If(Connection.Connected,
    ForAll(colTest,
	    Patch(NEWOfflineTEST,
		Defaults(NEWOfflineTEST),
		{
            random111:random111,
            random222:random222,
            random333:random333
        }
        )

    );
    Clear(colTest)
);
SaveData(
    colTest,
    "SavedTestData"
)

 

 

and it doesnt work, it doesnt patch and clear (i presume its because the timer isnt ending.. so i used the same code for On Timer Start.) however that gives me an error that the "name is too long"

 

this code works fine if i use the tradional text code of

 

Text(Time(0, 0, StatusTimerTest1.Value/1000), "hh:mm:ss")

 



rather than the countdown code of

 

Text(Time(0, 0, (StatusTimerTest1.Duration-StatusTimerTest1.Value)/1000), "[$-en-US]ss")

 

 

whats going on>? can i not use code on a countdown timer>/

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Try setting that code on your Start property and setting the Auto Start to false.

 

I'm able to set a label's color and Patch to a SP list with the following setup:

 

Timer Property:

AutoStart: false

Duration: 3000

OnTimerEnd: 

If(vColor=Green,Set(vColor, Red),Set(vColor, Green));

Patch(myList,Defaults(myList),
    {Title: vTitle, ConversionDate: Now()})

OnTimerStart: false

Reset: true (try this setting first)

Start: vTimerStart

 

The Reset Property can sometimes be the issue so try that first. I wouldn't use AutoStart in the way you are using it, I prefer using Start. Timer as soooo finnicky to setup and use.

 

Did you check if your Timer is restarting and counting down each time ie UnHide it and see?

 

View solution in original post

6 REPLIES 6
Eelman
Super User
Super User

@ShaneITAutomate 

Unhide the Timer control and check that it's starting. What's have you set the 'Start' property of the Timer to?

its set to false, it auto starts when i trigger it, because i have the following code on auto start

If(Value(StatusTEXTTest1.Text) >= 1, true, false) 

 

its some kind of bug.

Try setting that code on your Start property and setting the Auto Start to false.

 

I'm able to set a label's color and Patch to a SP list with the following setup:

 

Timer Property:

AutoStart: false

Duration: 3000

OnTimerEnd: 

If(vColor=Green,Set(vColor, Red),Set(vColor, Green));

Patch(myList,Defaults(myList),
    {Title: vTitle, ConversionDate: Now()})

OnTimerStart: false

Reset: true (try this setting first)

Start: vTimerStart

 

The Reset Property can sometimes be the issue so try that first. I wouldn't use AutoStart in the way you are using it, I prefer using Start. Timer as soooo finnicky to setup and use.

 

Did you check if your Timer is restarting and counting down each time ie UnHide it and see?

 

View solution in original post

IGNORE

Hey Eelman,

 

I know what the problem is,

 

Ive copied and pasted the timer to save on time.. the timer is from an old app. Its not working properly because of this. Cheers for the help. I really do appreciate people such as yourself

 

Happy to help mate

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,770)