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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How to pre-populate ti...
Power Apps
Unanswered

How to pre-populate timer control value?

(0) ShareShare
ReportReport
Posted on by 46

Hi all,

 

I'm developing an app with a timer control to store how long the user takes to do a test. When the user finishes the test, a button patch the timer value into my DB.

 

The problem I'm suffering now is the following:

 

If the user closes the app for some reason, I have an auto-save functionality that saves all data (inclusive timer value).
But when he opens the app to continue the test, the timer resets to 00:00:00, and I would like it to continue from the time he previously stopped (time value saved in the DB).

 

Is there a way to do it using some property from the timer control?

 

I was thinking about a solution involving (a label that stores in real-time the timer value, but to do this, I need to change a lot of coding in my app.

 

Thanks!

Categories:
I have the same question (0)
  • BCLS776 Profile Picture
    8,994 Moderator on at

    I'm curious - why use a timer when we have absolute time references that provide a timestamp in UTC?: 

     

    DateAdd( Now(), TimeZoneOffset(), Minutes )

     

    It seems hard to get a timer control to do what you are after.

     

  • Frederico Profile Picture
    46 on at

    I need to know how long the user takes to complete the whole test.

  • BCLS776 Profile Picture
    8,994 Moderator on at

    Would it work for your case to calculate the time difference between two timestamps: one when the user begins work (or resumes work) on the test, and another when they pause or finish the test? The time difference could be accumulated in a field in a database.

  • Frederico Profile Picture
    46 on at

    Just to let you guys know. I've solved this problem using a global variable that stores the timer.value, and then I patched the total timer adding the value of the variable and the timer.value of the second session. The only issue with that approach(but my user didn't bother with that) is that the timer.text starts from zero when you are back to the test.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard