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
Super User
Super User

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

7 REPLIES 7
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
Super User
Super User

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
Super User
Super User

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. 

cwebb365
Super User
Super User

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 V
Helper V

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 ?

 

Hi,

How would you link your timer to the label holding the difference between Today() & the check-in variable? Can't see that myself just yet.

Kind regards!

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (4,169)