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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Timer Control Powerapps
Power Apps
Answered

Timer Control Powerapps

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

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?

Categories:
I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    154,797 Most Valuable Professional on at

    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.

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @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})

     

  • WarrenBelz Profile Picture
    154,797 Most Valuable Professional on at

    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.

     

     

  • WarrenBelz Profile Picture
    154,797 Most Valuable Professional on at

    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.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 505

#2
WarrenBelz Profile Picture

WarrenBelz 502 Most Valuable Professional

#3
Haque Profile Picture

Haque 324

Last 30 days Overall leaderboard