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

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
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
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (15,628)