# How to display only online users on a screen?

**URL:** <https://forum.adalo.com/t/how-to-display-only-online-users-on-a-screen/11359>\
**Category:** Get Help\
**Created:** [April 13, 2021, 2:59pm UTC](https://forum.adalo.com/t/how-to-display-only-online-users-on-a-screen/11359 "2021-04-13T14:59:11Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Louis33](https://avatars.discourse-cdn.com/v4/letter/l/a4c791/32.png) [@Louis33](https://forum.adalo.com/u/Louis33)\
**Post date:** [April 13, 2021, 2:59pm UTC](https://forum.adalo.com/t/how-to-display-only-online-users-on-a-screen/11359/1 "2021-04-13T14:59:12Z")

</div>

Hello everyone,

I would like to display on my homepage only the profiles that are currently online but I can’t. Does anyone know how to do this?

Thanks for your valuable feedback!

Louis.

 ![Capture d’écran 2021-04-13 à 16.58.21](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/2X/9/9563fe29ea425cb7f6769b6a5982068d604ab48d.png)

---

<div class="post-metadata">

**Author:** ![Victor](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/victor/32/2054_2.png) [@Victor](https://forum.adalo.com/u/Victor)\
**Post date:** [April 13, 2021, 3:27pm UTC](https://forum.adalo.com/t/how-to-display-only-online-users-on-a-screen/11359/2 "2021-04-13T15:27:41Z")

</div>

Hi @Louis33,

There is no built-in way to do such things in Adalo.  
You could create a workaround:

- add a field to Users collection, call it “Last activity time”
- update this field when user does something in the app (for example, enters the chat screen)
- Filter the list of users based on the value of this field (smth like if Current User → Last activity time is less then 5 minutes ago).

The downside of this solution is that it’ll cause a load on a DB, especially if there are many users and if your app will try to update last activity time frequently.

Note - I haven’t tried this solution in person, so implementation details might be a bit different, and I can’t guarantee it’ll work 100% 🙂

Best regards, Victor.

---

<div class="post-metadata">

**Author:** ![Louis33](https://avatars.discourse-cdn.com/v4/letter/l/a4c791/32.png) [@Louis33](https://forum.adalo.com/u/Louis33)\
**Post date:** [April 13, 2021, 3:31pm UTC](https://forum.adalo.com/t/how-to-display-only-online-users-on-a-screen/11359/3 "2021-04-13T15:31:07Z")

</div>

> [@Victor](#):
>
> There is no built-in way to do such things in Adalo.  
> You could create a workaround:
> 
> - add a field to Users collection, call it “Last activity time”
> - update this field when user does something in the app (for example, enters the chat screen)
> - Filter the list of users based on the value of this field (smth like if Current User → Last activity time is less then 5 minutes ago).
> 
> The downside of this solution is that it’ll cause a load on a DB, especially if there are many users and if your app will try to update last activity time frequently.
> 
> Note - I haven’t tried this solution in person, so implementation details might be a bit different, and I can’t guarantee it’ll work 100% 🙂
> 
> Best regards, Victor.

Hello Victor, thank you very much for your feedback it’s very cool ! I will try this solution then and hope it will work 🙂

Thank you so much Victor !

---

<div class="post-metadata">

**Author:** ![Louis33](https://avatars.discourse-cdn.com/v4/letter/l/a4c791/32.png) [@Louis33](https://forum.adalo.com/u/Louis33)\
**Post date:** [April 13, 2021, 3:40pm UTC](https://forum.adalo.com/t/how-to-display-only-online-users-on-a-screen/11359/4 "2021-04-13T15:40:43Z")

</div>

> [@Victor](#):
>
> - add a field to Users collection, call it “Last activity time”
> - update this field when user does something in the app (for example, enters the chat screen)
> - Filter the list of users based on the value of this field (smth like if Current User → Last activity time is less then 5 minutes ago).

Sorry but how do you do “last activity was less than 5 minutes ago”?

---

<div class="post-metadata">

**Author:** ![Yongki](https://avatars.discourse-cdn.com/v4/letter/y/7c8e57/32.png) [@Yongki](https://forum.adalo.com/u/Yongki)\
**Post date:** [April 13, 2021, 10:01pm UTC](https://forum.adalo.com/t/how-to-display-only-online-users-on-a-screen/11359/5 "2021-04-13T22:01:36Z")

</div>

Hi @Louis33 ,

Check this thread.

> [@Tutorial App Setting, Still Online and Forced Logout](https://forum.adalo.com/t/tutorial-app-setting-still-online-and-forced-logout/10542):
>
> Hi All, Here is cloneable app. App Setting collection is 1-record only and used to contain global variables, we can access it using list disguised as button. (login and signup button) To make list of a button, by clicking vertical 3 dots in left panel. Still Online is toggle (true/false) property in users collection, is used to make visible green ellipse at user’s icon (at top right corner). Along with last online, this could be useful when doing bulk update to check how much time has elap…

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/system/32/40401_2.png) [@system](https://forum.adalo.com/u/system)\
**Post date:** [April 23, 2021, 10:01pm UTC](https://forum.adalo.com/t/how-to-display-only-online-users-on-a-screen/11359/6 "2021-04-23T22:01:50Z")

</div>

Closed on April 23, 2021, 10:01pm UTC

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.
