I am trying to develop an attendance tracker in the power-app connected to SharePoint list (user, log in & log out time).
since the user would be updating the app twice( once during login & another during log out), 2 different list are created. cannot find a way to combine in one list. can someone help?
login function - Patch('Online Attendance',Defaults('Online Attendance'),{'Log in':Text(Now(),DateTimeFormat.ShortDateTime)}
logout function - Patch('Online Attendance',Defaults('Online Attendance'),{'Log out':Text(Now(),DateTimeFormat.ShortDateTime)}
Hi @v-xiaochen-msft ,
There is an issue, suppose I "log in" via app & then I close the app, later when I reopen the app & try to use "log out" button the SharePoint list doesn't update.
but if I use log in & log out at the same time (without closing the app), the list is updated perfectly.
i guess the app deletes the variable we created, once we close the app. any other way of doing this?
works perfect 🙂 thank you so much
Hi @Anonymous ,
Please try this:
login function - Set(Thevar,Patch('Online Attendance',Defaults('Online Attendance'),{'Log in':Text(Now(),DateTimeFormat.ShortDateTime)} ))
logout function - Patch('Online Attendance',Thevar,{'Log out':Text(Now(),DateTimeFormat.ShortDateTime)})
Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.
WarrenBelz
791
Most Valuable Professional
MS.Ragavendar
410
Super User 2025 Season 2
mmbr1606
275
Super User 2025 Season 2