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 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 ?

 

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
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (1,823)