Hello i want to create an activity log display where it showcases the users time of log in/logout . can i get step by step instructions on how to go about it?
try above
yea this particular option and video provided in the discussion does not help in terms of what im looking for.
Hi there, @novotelsystems… here is how I might go about doing what you described. First, create a custom data type called something like Session Activity
, and create (at least) two fields (date) in the data type, one for the logged in date/time and one for the logged out date/time. Then, to make things easier, I might add a field called current session
to the User
data type with a field type of Session Activity
.
When a user logs in, create a new thing in the Session Activity
data type, and populate the newly-created thing’s logged in
field with the current date/time. In the second step of the workflow, make changes to the current user, and populate the user’s current session
field with the result of step 1.
When the user logs out, make changes to the thing in the user’s current session
field, and populate the thing’s logged out
field with the current date/time.
Anyway, that’s one way you could go here, and I hope it helps.
Best…
Mike
yes thank you very much the login data recording worked but for some reason the logout data is not saved in the database.
There is no way to know why it isn’t working without seeing what you did… share some screenshots.
You need to make changes to the thing before logging the user out… so, try moving that step to step 1.
Are you populating the user’s currentsession
field when you create a new thing in the session_activity
data type? Share more screenshots.
Log the user in first (i.e., make that step 1) and then create the new thing in the session_activity
data type and then make changes to the current user (putting the result of step 2 in the user’s currentsession
field).
Did you make the change from my last reply? Are you sure the user’s currentsession
field has a session in it? Run the workflow in step-by-step mode to see if the debugger can help you figure out what’s going on.
It looks like you are still logging the user out before making changes to the user’s session activity. As I already said, move the step where you make the change to the session activity to step 1 of the logout workflow.
yes you are right dont know how i missed that thank you very much it works 100%