# Hide/show rows in a single collection based on user type

**URL:** <https://community.glideapps.com/t/hide-show-rows-in-a-single-collection-based-on-user-type/76757>\
**Category:** Ask for Help\
**Created:** [October 2, 2024, 1:47pm UTC](https://community.glideapps.com/t/hide-show-rows-in-a-single-collection-based-on-user-type/76757 "2024-10-02T13:47:16Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![izumiinoue](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/izumiinoue/32/79768_2.png) [@izumiinoue](https://community.glideapps.com/u/izumiinoue)\
**Post date:** [October 2, 2024, 1:47pm UTC](https://community.glideapps.com/t/hide-show-rows-in-a-single-collection-based-on-user-type/76757/1 "2024-10-02T13:47:16Z")

</div>

I’m building a checklist of tasks that bereaved families have to deal with after losing a loved one. Where I’m from, these tasks can be very different depending on the deceased person’s religion so during onboarding, we ask our users to specify if they’re Muslim or Non-Muslim (stored in the **Users** table).

 ![Screenshot 2024-10-02 at 9.24.22 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/c/3/c3f3755e6999eb9435574847f58906c3f527a54c.png)

In our **Checklist** table, I’ve added a column that specifies if that particular task (row) applies to only our Muslim users or non-Muslim users or everyone.

 ![Screenshot 2024-10-02 at 9.24.51 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/d/6/d68ffd6bf6d2f2b0207b0dc156a29e891ab75645.jpeg)

As for the layout, I’m currently displaying the Checklist on it’s own tab as a single collection.

 ![Screenshot 2024-10-02 at 9.43.42 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/3/b/3be3cbe9c6050d2f987c694170b81d73b87b26d3.jpeg)

My question is, how do I go about only showing the tasks (rows) that are relevant to that particular user based on the religious preference that they’ve selected during onboarding?

---

<div class="post-metadata">

**Author:** ![micheal](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/micheal/32/80181_2.png) [@micheal](https://community.glideapps.com/u/micheal)\
**Post date:** [October 2, 2024, 2:03pm UTC](https://community.glideapps.com/t/hide-show-rows-in-a-single-collection-based-on-user-type/76757/2 "2024-10-02T14:03:56Z")

</div>

Steps:  
During signup add a field that gets their religion (I’m sure you’ve done that)  
Select options on the layout tab of the table you’re working with.  
Click on Add filter  
Then create the filter it should be like  
when Religion (on the checklist table) is Relion (on the user profile table - to get here: User profile \> Religion)

Just make sure the values are the same

Another way is to create a relation on the (checklist item) that says Religion is Religion (on the user profile)

---

<div class="post-metadata">

**Author:** ![izumiinoue](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/izumiinoue/32/79768_2.png) [@izumiinoue](https://community.glideapps.com/u/izumiinoue)\
**Post date:** [October 2, 2024, 2:20pm UTC](https://community.glideapps.com/t/hide-show-rows-in-a-single-collection-based-on-user-type/76757/4 "2024-10-02T14:20:54Z")

</div>

Thanks Michael, I’ve tried what you suggested and it works for tasks that are specifically for Muslim and non-Muslim users.

But what about the 3rd kind of tasks that should appear to both of these users (everyone), any way I can work that in?

---

<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:** [October 2, 2024, 2:32pm UTC](https://community.glideapps.com/t/hide-show-rows-in-a-single-collection-based-on-user-type/76757/5 "2024-10-02T14:32:11Z")

</div>

Adjust your filter to include both.

If religion matches X OR Both.

---

<div class="post-metadata">

**Author:** ![izumiinoue](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/izumiinoue/32/79768_2.png) [@izumiinoue](https://community.glideapps.com/u/izumiinoue)\
**Post date:** [October 2, 2024, 3:42pm UTC](https://community.glideapps.com/t/hide-show-rows-in-a-single-collection-based-on-user-type/76757/6 "2024-10-02T15:42:06Z")

</div>

Sorry Jeff, I’m not sure I follow. What do you mean by **both**? How do I do that given the current structure:

**User’s Religion** (Users table)

- Muslim
- Non-Muslim

**Task Applicable To** (Checklist table)

- Muslim only
- Non-Muslim only
- Both

---

<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:** [October 2, 2024, 6:01pm UTC](https://community.glideapps.com/t/hide-show-rows-in-a-single-collection-based-on-user-type/76757/7 "2024-10-02T18:01:42Z")

</div>

Set up the filter for the collection like this.

Religion **Is** User Profile → Religion  
**OR**  
Religion **Is** ‘Both’

---

<div class="post-metadata">

**Author:** ![izumiinoue](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/izumiinoue/32/79768_2.png) [@izumiinoue](https://community.glideapps.com/u/izumiinoue)\
**Post date:** [October 3, 2024, 3:50am UTC](https://community.glideapps.com/t/hide-show-rows-in-a-single-collection-based-on-user-type/76757/8 "2024-10-03T03:50:08Z")

</div>

Thanks Jeff, it worked perfectly. I have a follow-up question.

During onboarding, I also collect a bunch of other data from the user (also stored in **Users** table) including whether or not the deceased left a will, did they have any pets, etc. Is it possible to add another layer of filter based on their answers? This 2nd layer of filter applies to everyone (both Muslim and non-Muslim users).

 ![Screenshot 2024-10-03 at 11.44.33 AM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/c/9/c996bbbbbf7f679842231459c559fcf5efe63739.png)

And what’s the best way to structure the additional columns in the **Checklist** table?

---

<div class="post-metadata">

**Author:** ![Stuart\_Pembery](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/stuart_pembery/32/80332_2.png) [@Stuart\_Pembery](https://community.glideapps.com/u/Stuart_Pembery)\
**Post date:** [October 3, 2024, 9:41am UTC](https://community.glideapps.com/t/hide-show-rows-in-a-single-collection-based-on-user-type/76757/9 "2024-10-03T09:41:48Z")

</div>

Hi there. I’m a new user (three hours in) and just have one remaining issue in my app.

Similar requirement, I have a many-to-many relationship between two tables resolved in a joining table.

What I’m looking to do is click on a User in my User View and show their Sessions.

 ![Screenshot 2024-10-03 103340](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/4/3/43f525cb684eadc3063bd271bc5f0f914482cba0.jpeg)

 ![Screenshot 2024-10-03 103437](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/6/d/6d03cd9c73f80e73bed8debe22bbfb05034225c4.jpeg)

I’ve created a collection in my User layout which shows the unfiltered data have added relation and lookup columns in the many-to-many but I can’t work out how to add a filter where I say User/UserName = UserSessions/User Name.

 ![Screenshot 2024-10-03 103509](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/b/c/bcc9c6adc4ab09ec088bf5545ea11e8348998455.png)

Click on Name brings me here…

 ![Screenshot 2024-10-03 104132](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/d/a/daedc2117d7667ca64a00a43ba7f461b3c2d51e6.png)

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/b/c/bcbeff0c17410df6015ca6a17a1959a5a0178d05.png)

I’m sure that I’m doing something stupid but can you help me please?

Thanks

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [October 3, 2024, 10:36am UTC](https://community.glideapps.com/t/hide-show-rows-in-a-single-collection-based-on-user-type/76757/10 "2024-10-03T10:36:27Z")

</div>

You should be able to use a Screen Filter.  
UserEmail is Screen-\>UserEmail

> **[Screen Values | Glide Docs](https://www.glideapps.com/docs/reference/values/screen-values#filtering-collections)**
>
> Values that you can access from the current screen.

---

<div class="post-metadata">

**Author:** ![Stuart\_Pembery](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/stuart_pembery/32/80332_2.png) [@Stuart\_Pembery](https://community.glideapps.com/u/Stuart_Pembery)\
**Post date:** [October 3, 2024, 11:52am UTC](https://community.glideapps.com/t/hide-show-rows-in-a-single-collection-based-on-user-type/76757/11 "2024-10-03T11:52:23Z")

</div>

Thanks. I’ve got it working now but I’m not quite sure how 🙂

---

<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:** [October 4, 2024, 1:00am UTC](https://community.glideapps.com/t/hide-show-rows-in-a-single-collection-based-on-user-type/76757/12 "2024-10-04T01:00:28Z")

</div>

> [@izumiinoue](#):
>
> During onboarding, I also collect a bunch of other data from the user (also stored in **Users** table) including whether or not the deceased left a will, did they have any pets, etc. Is it possible to add another layer of filter based on their answers? This 2nd layer of filter applies to everyone (both Muslim and non-Muslim users).

Use an If-Then-Else column.

If Religion **Is** User Profile → Religion =\> true  
If Religion **Is** ‘Both’ =\> true  
then If Will **Is** ‘No’ =\> true

Add every condition you need and use that column to filter your checklist.

---

<div class="post-metadata">

**Author:** ![izumiinoue](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/izumiinoue/32/79768_2.png) [@izumiinoue](https://community.glideapps.com/u/izumiinoue)\
**Post date:** [October 7, 2024, 4:54pm UTC](https://community.glideapps.com/t/hide-show-rows-in-a-single-collection-based-on-user-type/76757/13 "2024-10-07T16:54:26Z")

</div>

Thanks @ThinhDinh, it’s midnight and my brain is fried. Need some help with this.

I would like to split up the same table (Checklist) into multiple collections within the same tab, based on the urgency of the task (e.g.: **Right Away** , **Week 1** , **Week 2** , **Month 1** , etc). I’m not using **Group By** because I would like to display an image at the top of each collection/urgency.

 ![Screenshot 2024-10-08 at 12.23.43 AM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/1/3/1376b3e7aa1c67bc967c9505e40f4254811af731.jpeg)

And I still want to maintain the previous filter of showing rows/tasks based on the user’s religion. I’ve tried the following method but it doesn’t work.

![Screenshot 2024-10-08 at 12.53.21 AM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/6/9/69687c2931d69d7640c9cf5ec317d80af3d1293e.png)

This is how my table looks like, please help.

 ![Screenshot 2024-10-08 at 12.03.04 AM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/4/c/4c46b587b688f03fdf4cfc6ada9801ef3e7c719a.jpeg)

---

<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:** [October 7, 2024, 11:18pm UTC](https://community.glideapps.com/t/hide-show-rows-in-a-single-collection-based-on-user-type/76757/14 "2024-10-07T23:18:37Z")

</div>

I think you have to convert the Applicable thing into a single boolean first.

If Applicable is Everyone =\> true.  
If Applicable is User Profile \> Religion =\> true.

Then in your filter, if the above value is true and When is Right Away =\> show for Right Away collection and so on.

---

<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:** [October 14, 2024, 11:19pm UTC](https://community.glideapps.com/t/hide-show-rows-in-a-single-collection-based-on-user-type/76757/15 "2024-10-14T23:19:11Z")

</div>

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