Is there a way I can see which users are currently logged into the application?

Before I want to do a new install or trace, I want to check who is currently logged in so I can let them know they will be logged out.
Is there a way I access this information?

Yes, the kendoprocesslog table stores clicks user makes. With this expression you can lookup the users that have been active the last 15 minutes. Change the -15 to another number if you like.

In large applications the kendoprocesslog table can become very large. Thats’s why there is an int:max statement to limit the results. The sub(1000) need to be higher if you look back more minutes, but that depends on the amount of users using the application.

{
 users,
 email.tostring(),
 int:count({
  kendoprocesslog,
  1,
  boolean:and([
   id.isgreater(int:max({kendoprocesslog,id}).sub(1000)),
   user.equals(parent),
   this.datetime.isgreaterequal(datetime:now().addminutes(-15))   
  ])
 }).isgreater(0)
}
4 Likes

I use this (to filter out the “nop” part where people are not active, just leaving their browser tab open.) This does not filter out the part where a browser tab is left to look at a workflowpanel though, if you;re wondering what people are doing all night in deployment :slight_smile:

{
users,
<email.tostring(),
int:count({
kendoprocesslog,
1,
boolean:and([
id.isgreater(int:max({kendoprocesslog,id}).sub(3000)),
user.equals(parent),
boolean:not(action.equals(“nop”))
])
}),
datetime:max({
kendoprocesslog,
datetime,
boolean:and([id.isgreater(int:max({kendoprocesslog,id}).sub(3000)),user.equals(parent),
boolean:not(action.equals(“nop”))])
})
>,
int:exists({
kendoprocesslog,
1,
boolean:and([id.isgreater(int:max({kendoprocesslog,id}).sub(3000)),user.equals(parent),
boolean:not(action.equals(“nop”))])
}),
datetime:max({
kendoprocesslog,
datetime,
boolean:and([id.isgreater(int:max({kendoprocesslog,id}).sub(3000)),user.equals(parent),
boolean:not(action.equals(“nop”))])
}).desc
}

2 Likes