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

its possible if I closed the app after checked in than the timer will automatically running in the backend and when we again open app and shows timer running ?

if its possible than how please tell me asap?

1 ACCEPTED SOLUTION

Accepted Solutions
cwebb365
Solution Sage
Solution Sage

I mean, your on screen time (timer) would just key off the Checked-in date/time. So you just need to store that, then when you open the app do the delta with the current date time value, until there is a check out or other rule happens to turn that timer off. 

View solution in original post

6 REPLIES 6
OanaBoghici
Helper I
Helper I

By default this is not possible. You could try implementing some variables and store them on the device with SaveData and then reload them back on app start, but unfortunately I can't think of any place where you would save data exactly when the app closes.

StalinPonnusamy
Community Champion
Community Champion

Hi @Akashdeep

 

As @OanaBoghici mentioned,

 

  • There is no OnExit or OnLeave function in PowerApps (We have OnStart though)
  • Need to store the Timer value for each user in the DB/SP/Source
  • We need to have some button/icon so that user needs to click before Existing
  • We Can enable ConfrimExit to true and Display Some Messages on "ConfirmExitMessage" to make the user saves the Timer value in DB
cwebb365
Solution Sage
Solution Sage

I mean, your on screen time (timer) would just key off the Checked-in date/time. So you just need to store that, then when you open the app do the delta with the current date time value, until there is a check out or other rule happens to turn that timer off. 

View solution in original post

cwebb365
Solution Sage
Solution Sage

Basically, you add a timer and hide it, have duration 1 or 5 seconds, turn repeat to true, then change the onstart or whatever it is you can use a global variable and just calculate the time difference between your stored "Check-in" date/time from the today() function and then display that variable in a label somewhere and that is your timer. It'll update every 1 / 5 seconds with the current check in time. 

Akash17
Helper I
Helper I

Set the timer's AutoStart property to true and its Visible property to false.

The timer is invisible and starts automatically.

Set the screen's On Start property Set(Current Time, Now())

Refer:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-now-today-istoday

Thank you

will u explain how we can do that , step by step ?

 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Power Apps Community Call Jan. 2022 768x460.png

Power Apps Community Call

Please join us on Wednesday, January 19th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (2,243)