web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : g/cO+p9p4JpJ+ueo4ChM2I
Power Apps - Building Power Apps
Answered

Timer Control Powerapps

Like (0) ShareShare
ReportReport
Posted on 20 May 2020 07:07:54 by

Hi All,

i have a timer control which allows it to function on a start and a stop button. 
Start button basically starts the timer and stop button saves the timer value in hh:mm:ss in a sharepoint field and resets the timer.

here is the code below for it.

UpdateContext({timer: Text(Time(0, 0, Timer1.Value/1000), "[$-en-US]hh:mm:ss")});

 Now, the requirement is that every time the timer is started and stopped it should append to its previous value. 

so if my timer duration field has value of 00:00:05 seconds and i turned the timer on and off again and it captured 00:00:10 seconds the total time in the field should be 00:00:15 seconds. 
which means i basically want to add previous and current value and store it in the field, how do i do that?

  • WarrenBelz Profile Picture
    149,186 Most Valuable Professional on 23 May 2020 at 06:25:57
    Re: Timer Control Powerapps

    Hi @Anonymous ,

    Just checking if you got the result you were looking for on this thread. Happy to help further if not.

     

    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.

  • WarrenBelz Profile Picture
    149,186 Most Valuable Professional on 20 May 2020 at 09:04:27
    Re: Timer Control Powerapps

    Hi@Anonymous ,

    You only use that code once a the start (I thought I had said that in my post) - it simply initiates the Variable.

    The other code will then do what you need.

     

    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.

     

     

  • Community Power Platform Member Profile Picture
    on 20 May 2020 at 08:57:10
    Re: Timer Control Powerapps

    @WarrenBelz i tried your approach and it worked fine, however the below code sets the variable value to 0 and thus it looses the value stored before. i have just used to addition code and it worked fine.

    UpdateContext({vTimer:0})

     

  • Verified answer
    WarrenBelz Profile Picture
    149,186 Most Valuable Professional on 20 May 2020 at 07:17:51
    Re: Timer Control Powerapps

    Hi @Anonymous ,

    Firstly you need to get rid of the Text as you cannot add anything to it.

    Initiate a Variable - you can do this when you start the timer - call it whatever you want

    UpdateContext({vTimer:0})

    Timer stops

    UpdateContext({vTimer: vTimer+Timer1.Value})

    each time it will add to the value stored there

     

    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.

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 637 Most Valuable Professional

#2
stampcoin Profile Picture

stampcoin 570 Super User 2025 Season 2

#3
Power Apps 1919 Profile Picture

Power Apps 1919 473

Loading complete