# How to show a list of users who have "Read" a comment

**URL:** https://community.glideapps.com/t/how-to-show-a-list-of-users-who-have-read-a-comment/40781
**Category:** Ask for Help
**Created:** [April 16, 2022, 9:30am UTC](https://community.glideapps.com/t/how-to-show-a-list-of-users-who-have-read-a-comment/40781 "2022-04-16T09:30:54Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Dragonjamesx](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dragonjamesx/32/41398_2.png) [@Dragonjamesx](https://community.glideapps.com/u/Dragonjamesx)
#### Post date: [April 16, 2022, 9:30am UTC](https://community.glideapps.com/t/how-to-show-a-list-of-users-who-have-read-a-comment/40781/1 "2022-04-16T09:30:54Z")

</div>

I am trying to create a screen in my app to show the users that have read a comment. So, it would be rather like FB messenger which shows it has been read and you can then list icons of each user as each user reads it.

The principle appears simple, an inline list showing a relation as each comment fills with users that have read it. But this is where I am stuck

How do I record when a user has “seen” a comment? There seems to be no obvious way of tracking and recording this data.

Being new, naturally, I was looking for a tool that maybe is “hidden” that records a “view” event. When that event = true, then the user identifier (in my case their email) is recorded in the COMMENTS table. The relation simply sees these emails against the comment to “know” it is read.

Does this make sense?  
James

---

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [April 16, 2022, 9:44am UTC](https://community.glideapps.com/t/how-to-show-a-list-of-users-who-have-read-a-comment/40781/2 "2022-04-16T09:44:14Z")

</div>

I think you can do it like this.

- Have a column in your comments table that holds the list of user emails that have read the comment.

- Add an if then else column to cover all the possibilities of a user when they enter to read the comment.

If email list (step 1) is empty, then {E}.

If email list (step 1) does not contain signed-in user’s email then {L}, {E}.

If email list (step 1) contains signed-in user’s email then {L}.

- Construct a template column using the if then else result above, and replace {L} by the existing email list, {E} by the signed-in user’s email.

- In the action that leads user to read the comment, you will first set the template column above to the email list (to update it), then show the detail screen of the comment.

> [@Dragonjamesx](#):
>
> list icons of each user as each user reads it.

You can then use an inline list pointing to your users table, filter by email is included in screen’s email list and display their images.

---

<div class="post-metadata">

### Author: ![V88](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/v88/32/90054_2.png) [@V88](https://community.glideapps.com/u/V88)
#### Post date: [April 16, 2022, 10:07am UTC](https://community.glideapps.com/t/how-to-show-a-list-of-users-who-have-read-a-comment/40781/3 "2022-04-16T10:07:26Z")

</div>

Also, if you’re not too worried about knowing who’s read the “comment” but you just want a user to know which they’ve personally read, then a simple User Specific boolean column would suffice. This would allow you to show a user all comments that they have yet to read, for example.

---

<div class="post-metadata">

### Author: ![Dragonjamesx](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dragonjamesx/32/41398_2.png) [@Dragonjamesx](https://community.glideapps.com/u/Dragonjamesx)
#### Post date: [April 16, 2022, 10:17am UTC](https://community.glideapps.com/t/how-to-show-a-list-of-users-who-have-read-a-comment/40781/4 "2022-04-16T10:17:44Z")

</div>

Thanks @ThinhDinh for your help here. I think this adds the email each time someone views so although it works, it will keep adding email addresses to my table making it large.

However, I really like the if then else thing - thanks for that! And I never thought of the template suggestion - brilliant.

---

<div class="post-metadata">

### Author: ![Dragonjamesx](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dragonjamesx/32/41398_2.png) [@Dragonjamesx](https://community.glideapps.com/u/Dragonjamesx)
#### Post date: [April 16, 2022, 10:18am UTC](https://community.glideapps.com/t/how-to-show-a-list-of-users-who-have-read-a-comment/40781/5 "2022-04-16T10:18:56Z")

</div>

Thanks @V88 this has done the trick as it stops the email from being recorded mutlitple times. IT is a true or false for that user as they only need to see it once to have been “read” I dont need to see how many times they have read.

Problem solved - thanks everyone!

---

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [April 16, 2022, 10:42am UTC](https://community.glideapps.com/t/how-to-show-a-list-of-users-who-have-read-a-comment/40781/6 "2022-04-16T10:42:44Z")

</div>

> [@Dragonjamesx](#):
>
> I think this adds the email each time someone views so although it works, it will keep adding email addresses to my table making it large.

This part addresses it.

> [@ThinhDinh](#):
>
> If email list (step 1) does not contain signed-in user’s email then {L}, {E}.
> 
> If email list (step 1) contains signed-in user’s email then {L}.

Saying the list is [a@gmail.com](mailto:a@gmail.com), [b@gmail.com](mailto:b@gmail.com) then if [b@gmail.com](mailto:b@gmail.com) is viewing the comment, it falls into the last scenario and returns the same list, so you’re essentially writing the same value to the column.

---

<div class="post-metadata">

### Author: ![Dragonjamesx](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dragonjamesx/32/41398_2.png) [@Dragonjamesx](https://community.glideapps.com/u/Dragonjamesx)
#### Post date: [April 17, 2022, 9:10am UTC](https://community.glideapps.com/t/how-to-show-a-list-of-users-who-have-read-a-comment/40781/7 "2022-04-17T09:10:44Z")

</div>

Oh yes thank you @ThinhDinh this helps too. It seems I have two ways to skin the cat. Will try it - thanks for your help

---

<div class="post-metadata">

### Author: ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)
#### Post date: [April 18, 2022, 9:11am UTC](https://community.glideapps.com/t/how-to-show-a-list-of-users-who-have-read-a-comment/40781/8 "2022-04-18T09:11:14Z")

</div>

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