Display User Logged in count

Hi,

The scenario is in admin page, admin has to view how many users logged in the website.

I have the count of the logged user and want to display in the page. It will refresh automatically if some user has logged in or logged out. 

Could you please suggest any idea?


Thanks,

Aravind

Hi Arvind,

You can use a timer here. 

Set the timer to trigger after defined seconds and check if the count is changed then ajax refresh the container where you display the count.


Hope that helps.


Thanks,

Waseema


Aravind wrote:

Hi,

The scenario is in admin page, admin has to view how many users logged in the website.

I have the count of the logged user and want to display in the page. It will refresh automatically if some user has logged in or logged out. 

Could you please suggest any idea?


Thanks,

Aravind


Hello Aravind, how are you?

There is one entity that contains such information as well as the login attempts.
This information is stored in a table from the Users Module called LoginAttempt. With direct access to the database, you should be able to query the login attempt information and determine the user that is login into the applications.

To find the actual physical table name for the LoginAttempt table, you could perform a Join between the Espace table and Entity table from the System module as follows:



And then filter by the Users module and LoginAttempt Table.


This should give you the physical table name for the LoginAttempt table where you could query the results to see which user is login into the applications.

Aravind wrote:

Hi,

The scenario is in admin page, admin has to view how many users logged in the website.

I have the count of the logged user and want to display in the page. It will refresh automatically if some user has logged in or logged out. 

Could you please suggest any idea?


Thanks,

Aravind

Refer solution by Eduardo Jauch

https://www.outsystems.com/forums/discussion/38299/overview-of-all-logged-in-active-end-users-in-the-applications/

Thanks


Waseema wrote:

Hi Arvind,

You can use a timer here. 

Set the timer to trigger after defined seconds and check if the count is changed then ajax refresh the container where you display the count.


Hope that helps.


Thanks,

Waseema


Hi Waseema,

Thanks for your prompt response. 

I am newbie here. I have tried but no luck. I have called the timer in presentation. So i cant use ajax refresh here.

Could you please share sample example.


Jay Santos wrote:

Aravind wrote:

Hi,

The scenario is in admin page, admin has to view how many users logged in the website.

I have the count of the logged user and want to display in the page. It will refresh automatically if some user has logged in or logged out. 

Could you please suggest any idea?


Thanks,

Aravind


Hello Aravind, how are you?

There is one entity that contains such information as well as the login attempts.
This information is stored in a table from the Users Module called LoginAttempt. With direct access to the database, you should be able to query the login attempt information and determine the user that is login into the applications.

To find the actual physical table name for the LoginAttempt table, you could perform a Join between the Espace table and Entity table from the System module as follows:



And then filter by the Users module and LoginAttempt Table.


This should give you the physical table name for the LoginAttempt table where you could query the results to see which user is login into the applications.

Thanks Jay,

But I have the count of logged in user. My question is just print the count in the page. if some user has logged in, the count should be updated and display the updated count in the screen. 



Solution

Aravind wrote:

Waseema wrote:

Hi Arvind,

You can use a timer here. 

Set the timer to trigger after defined seconds and check if the count is changed then ajax refresh the container where you display the count.


Hope that helps.


Thanks,

Waseema


Hi Waseema,

Thanks for your prompt response. 

I am newbie here. I have tried but no luck. I have called the timer in presentation. So i cant use ajax refresh here.

Could you please share sample example.



Hi Arvind,


Try using this Util

https://www.outsystems.com/forge/component-overview/2134/auto-refresh-utils


I tried it out and it works fine. This is excatly what you are looking for.

Cheers,

Waseema.


Solution

Waseema wrote:

Hi Arvind,


Try using this Util

https://www.outsystems.com/forge/component-overview/2134/auto-refresh-utils


I tried it out and it works fine. This is excatly what you are looking for.

Cheers,

Waseema.


Thanks Waseema.


I am looking this solution only. I will try in my application and hope this will work fine.