I Working on HRMS Application where if a Employee click on punch in button then timer gets start and before the 12 hours if Employee not click on punch out then there Attendance Entity set punch out time = punch in time and total hours = 0
Hi:
1. Create a timer
2. create server action to launch the timer
3. call the server action in the button
thanks
Hi priyanshu the work around is you need to run a timer in which you need to run a server action and on that server action you need to fetch the data of only those employees whose puch in is 12 hour long. You can do this by using the diff hours() function available in outsystems by passing the current time and punch in time.
After that you need to puch out that employee and rest condition you can manage.
Thanks hope this will help
Hi Priyanshu,
First of all, you do not need to start a timer after every punch in.
The idea here is to have a running timer that runs probably every minute that checks for punch ins that are already 12 hours old AND without punch out data.
To do this, create a timer that runs every minute. Then inside the timer action, you need an aggregate that fetches records with conditions DIFFHOURS(ShiftIn, CurrDateTime()) = 12 AND ShiftOut = NullDate()
Then foreach of the record, set ShiftOut = ShiftIn.
I hope this solves your problem.