Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Button (Time In ) - OnSelect Property
UpdateContext({varTimerActive:true});UpdateContext({varTimerReset:false});
Set(varNewItem, Patch('Attendance Time Tracker',Defaults('Attendance Time Tracker'),{Title:User().FullName,'Start Time':Now(),Location:Location.Latitude & "," & Location.Longitude,Working:true}))
Button (Time Out) - OnSelect Property
UpdateContext({varTimerActive: false});UpdateContext({varTimerReset:true});
Set(varNewItem, Patch('Attendance Time Tracker', LookUp('Attendance Time Tracker', varNewItem.ID=ID),{'End Time':Now(),'Time Spent':DateDiff(varNewItem.'Start Time',Now(),TimeUnit.Minutes),Working:false}))
Note:- It's working at the same time or before the app refresh. but after the app refresh it's not working.
any solution for this?
Thanks, Pankaj.