# New Bug on the Visibility Feature?

**URL:** https://community.glideapps.com/t/new-bug-on-the-visibility-feature/75030
**Category:** Ask for Help
**Created:** [July 20, 2024, 2:00pm UTC](https://community.glideapps.com/t/new-bug-on-the-visibility-feature/75030 "2024-07-20T14:00:59Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![Pierre\_Richet](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/pierre_richet/32/85979_2.png) [@Pierre\_Richet](https://community.glideapps.com/u/Pierre_Richet)
#### Post date: [July 20, 2024, 2:00pm UTC](https://community.glideapps.com/t/new-bug-on-the-visibility-feature/75030/1 "2024-07-20T14:00:59Z")

</div>

Hi everyone,

First of all, I want to say I searched the whole community about this issue and didn’t find a similar one.

For context, this is a chat app.

**First, what is happening in the Table section :**

1. I have a tab named Binome.

2. In this tab, there’s the columns **email\_user1** and **email\_user2**

 ![Capture d’écran 2024-07-20 à 17.45.30](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/9/a/9a2fd6a6e75ee87d2b4a13f6caa924fadb7f59d9.png)

**Secondly, what is happening in the Layout section :**

1. I have 2 collections, **1 collection for user 1** and **1 collection for user 2** (I have created 2 collections because this is was the only to display “unread messages” for the correct user)

2. As you can see below, it’s working perfectly. The **signed-in user** is seeing his conversations which where **his connected e-mail is email\_user1** ( **the user 2** is also seeing his conversations based on the condition where **his email\_user2 is recongnized as e-mail of the signed-in user**.)

 ![Capture d’écran 2024-07-20 à 17.40.58](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/8/6/86a4433baef93473715c688a4a23aacb1d54efa5.jpeg)

**Here’s the glitch**

The collection **is NOT visible for ALL the other user** of the Binome table.

Only **user 1 and user 2 of the FIRST LINE of the Table** can see their conversation. Not the others.

 ![Capture d’écran 2024-07-20 à 17.50.41](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/0/e/0eb94748c22bab7e54eafd7b63cf54ee7d1370a2.jpeg)

**What did I try to fix this issue :**

- Using only filtering
- Creating an IF column to check if the user1 is the connected user and changing the visibility condition
- I tried using the function Make Owner for the email column but it crashed the “unread messages” function

 ![Capture d’écran 2024-07-20 à 17.58.18](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/e/b/eb339f02f898f746b9d0fe3ca0e47202e979e9f6.png)

At this point, I’m really wondering if I’m DUMB, so your help would be greatly appreciated !

Thanks !

Pierre

---

<div class="post-metadata">

### Author: ![Pierre\_Richet](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/pierre_richet/32/85979_2.png) [@Pierre\_Richet](https://community.glideapps.com/u/Pierre_Richet)
#### Post date: [July 20, 2024, 3:39pm UTC](https://community.glideapps.com/t/new-bug-on-the-visibility-feature/75030/2 "2024-07-20T15:39:11Z")

</div>

Actually I think I understand, it will only display if the email\_user1 is the same one on all the lines

---

<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: [July 21, 2024, 12:28am UTC](https://community.glideapps.com/t/new-bug-on-the-visibility-feature/75030/3 "2024-07-21T00:28:50Z")

</div>

> [@Pierre\_Richet](#):
>
> I have 2 collections, **1 collection for user 1** and **1 collection for user 2** (I have created 2 collections because this is was the only to display “unread messages” for the correct user)

I’m not sure why you have to do this. If you have a user-specific column to determine if a message was read or not, wouldn’t it be able to show that in a single collection?

> [@Pierre\_Richet](#):
>
> As you can see below, it’s working perfectly. The **signed-in user** is seeing his conversations which where **his connected e-mail is email\_user1** ( **the user 2** is also seeing his conversations based on the condition where **his email\_user2 is recongnized as e-mail of the signed-in user**.)

You can structure this with If-Then-Else columns I think.

> [@Pierre\_Richet](#):
>
> The collection **is NOT visible for ALL the other user** of the Binome table.

I think you’re using the wrong thing. Visibility is applied on the component level, tied to your screen’s data. What you would want is filtering the data.

---

<div class="post-metadata">

### Author: ![Pierre\_Richet](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/pierre_richet/32/85979_2.png) [@Pierre\_Richet](https://community.glideapps.com/u/Pierre_Richet)
#### Post date: [July 22, 2024, 11:31am UTC](https://community.glideapps.com/t/new-bug-on-the-visibility-feature/75030/4 "2024-07-22T11:31:17Z")

</div>

Hello @ThinhDinh - thanks for your answer

Finally, I was able to filter the data at the Navigation level

 ![Capture d’écran 2024-07-22 à 15.23.57](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/a/e/ae38c4797b411172d85a355aa8e41e8b49c1ae39.jpeg)

> [@ThinhDinh](#):
>
> I’m not sure why you have to do this. If you have a user-specific column to determine if a message was read or not, wouldn’t it be able to show that in a single collection?

I just tested and unfortunately, Glide is not able to understand the unread\_colmun should be checked for user 2 and not user 1, so on so forth.

So I have to find another way to create the unread function while filtering the data on the same column

For information, before that, I created 2 columns (unread\_user1 and unread\_user2) so that when user1 sends a message, an action would check the unread\_user2, so on and so forth.

---

<div class="post-metadata">

### Author: ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)
#### Post date: [July 22, 2024, 1:08pm UTC](https://community.glideapps.com/t/new-bug-on-the-visibility-feature/75030/5 "2024-07-22T13:08:01Z")

</div>

I think you could have a single user specific boolean column instead of one for each user. Instead of checking the box to mark it as unread, don’t do anything with it and instead only check the box when the message is read. You should only need one checkbox for any number of users since it will be user specific. If the box is unchecked for a user, then it’s unread.

---

<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: [July 22, 2024, 1:28pm UTC](https://community.glideapps.com/t/new-bug-on-the-visibility-feature/75030/6 "2024-07-22T13:28:15Z")

</div>

On top of what Jeff suggested, I would have an extra action when the users click the chat item to set the current date/time to a user-specific date/time column.

Then any messages that are before that date/time value is considered read.

---

<div class="post-metadata">

### Author: ![Pierre\_Richet](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/pierre_richet/32/85979_2.png) [@Pierre\_Richet](https://community.glideapps.com/u/Pierre_Richet)
#### Post date: [July 22, 2024, 2:09pm UTC](https://community.glideapps.com/t/new-bug-on-the-visibility-feature/75030/7 "2024-07-22T14:09:12Z")

</div>

> [@Jeff\_Hager](#):
>
> I think you could have a single user specific boolean column instead of one for each user. Instead of checking the box to mark it as unread, don’t do anything with it and instead only check the box when the message is read. You should only need one checkbox for any number of users since it will be user specific. If the box is unchecked for a user, then it’s unread.

Unfortunately, it doesn’t work because the same user that just sent the message is also seeing the message as unread

---

<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: [July 22, 2024, 2:48pm UTC](https://community.glideapps.com/t/new-bug-on-the-visibility-feature/75030/8 "2024-07-22T14:48:52Z")

</div>

Then you can try adding what I said above to the flow. Set the current date/time to the column when the user sends a message as well.

---

<div class="post-metadata">

### Author: ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)
#### Post date: [July 22, 2024, 3:38pm UTC](https://community.glideapps.com/t/new-bug-on-the-visibility-feature/75030/9 "2024-07-22T15:38:38Z")

</div>

> [@Pierre\_Richet](#):
>
> the same user that just sent the message

Well, the user that creates the message would set the boolean as true. Since it would be a user specific boolean, it would still be unchecked for the second user. So in the end, the boolean would be set to true whenever a message is created and whenever it’s viewed.

But as @ThinhDinh suggests, you may be better off just tracking dates instead.

---

<div class="post-metadata">

### Author: ![Pierre\_Richet](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/pierre_richet/32/85979_2.png) [@Pierre\_Richet](https://community.glideapps.com/u/Pierre_Richet)
#### Post date: [July 23, 2024, 2:27pm UTC](https://community.glideapps.com/t/new-bug-on-the-visibility-feature/75030/10 "2024-07-23T14:27:34Z")

</div>

Thank you for your help guys!

On the table side, it’s finally working, but unfortunately, I don’t think I have the ability to check/uncheck the ‘unread’ column for the recipient, only for the sender.

Since it’s a user-specific column.

Will try to find how to bypass this limit.

 ![Capture d’écran 2024-07-23 à 18.24.46](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/c/7/c73659c00d19bf0521d91ecb4d13fcffe3d84c31.png)

Also, I have to admit that I didn’t understand how tracking the time might help

---

<div class="post-metadata">

### Author: ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)
#### Post date: [July 23, 2024, 3:27pm UTC](https://community.glideapps.com/t/new-bug-on-the-visibility-feature/75030/11 "2024-07-23T15:27:04Z")

</div>

> [@Pierre\_Richet](#):
>
> I don’t think I have the ability to check/uncheck the ‘unread’ column for the recipient, only for the sender

Essentially the recipient would call an action when they view the message, which would check the box. My thought is that unchecked=unread and checked=read. I think you are trying to do it the other way around where check=unread, which is a lot harder to achieve.

> [@Pierre\_Richet](#):
>
> Also, I have to admit that I didn’t understand how tracking the time might help

If you record the timestamp in each message row when it’s created, then you can retrieve the greatest timestamp and compare it to a global user specific timestamp for the entire conversation. If the date recorded the last time a user viewed the conversation is less than the last message date, then they have unread messages. If the date is greater than or equal to the last message date, then they don’t have any unread messages.

---

<div class="post-metadata">

### Author: ![Pierre\_Richet](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/pierre_richet/32/85979_2.png) [@Pierre\_Richet](https://community.glideapps.com/u/Pierre_Richet)
#### Post date: [July 25, 2024, 2:49pm UTC](https://community.glideapps.com/t/new-bug-on-the-visibility-feature/75030/12 "2024-07-25T14:49:52Z")

</div>

THANKS GUY ! It’s finally working ! I was stuck on this since 10 days lol…

I wasn’t aware that the column if-then-else would follow the user-specific logic. I did something (I don’t know what) but at first, it wasn’t following this logic but now, IT DOES 😃
