Showing results for 
Search instead for 
Did you mean: 
Level: Power Up

Use timer offline

Is it possible to use a timer when the app is closed? I would need it to record the workingtime of the employees. If I start the timer and lock my phone the timer pause and starts again when I unlock my phone and open the powerapp.

Is it possible that the timer runs even if the app is closed or the phone is locked?

Regards Simon

Level: Powered On

Re: Use timer offline

Perhaps you could store the timestamp instead and subtract it from the logout time to get the hours?

Community Support Team
Community Support Team

Re: Use timer offline

Hi @SimonJa,

Do you want to still use Timer control within your app when your app is closed or your phone screen is locked?

If you want to still use Timer control within your app when your app is closed or your phone screen is locked, I afraid that there is no way to achieve your needs in PowerApps currently.

When you lock your phone screen, your app would go into sleep state, all controls within your app would be paused. When you close your app, all controls functionality within your app would also be closed.


As an alternative solution, you could consider take a try to store the start time when the employee starts working and the employee name into your data source using the following formula:

           EmployeeName: "A specific employee name",
           StartTime: Now()

Then when you want to calculate the working time for this employee, you could take a try with the following formula:

         LookUp('YourDataSource', EmployeeName = "A specific employee name", StartTime), /* <-- retrieve the Start Time value for the specific employee name */

Note: The EmployeeName represents the column in your data source to store the employee name, the StartTime represents the Date column to store the start time when employee starts working.

More details about the Patch function, DateDiff function and LookUp function, please check the following article:

Patch function

LookUp function

DateDiff function


Best regards,



Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Level: Power Up

Re: Use timer offline

Hi @v-xida-msft,


Thank you for your answer.


I will try it with this method.


Would it be possible to use variables to store the time in them?


Regards Simon

Level: Powered On

Re: Use timer offline

I would try and store the information in case the app is closed or the phone shuts down due to battery loss.
It seems it can be done locally. 

Build app with offline capabilities
Functions load- and save data