# Best way to filter list data

**URL:** <https://community.glideapps.com/t/best-way-to-filter-list-data/12912>\
**Category:** Ask for Help\
**Created:** [July 22, 2020, 2:18am UTC](https://community.glideapps.com/t/best-way-to-filter-list-data/12912 "2020-07-22T02:18:53Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Navjeet\_Chabbewal](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/navjeet_chabbewal/32/10663_2.png) [@Navjeet\_Chabbewal](https://community.glideapps.com/u/Navjeet_Chabbewal)\
**Post date:** [July 22, 2020, 2:18am UTC](https://community.glideapps.com/t/best-way-to-filter-list-data/12912/1 "2020-07-22T02:18:53Z")

</div>

I have a sheet **skills** which currently has 2 columns **skill** and **email** (stores logged in user’s email). Currently the user adds one skill at a time, so for 2 skills there will be 2 rows. I can probably have Skills 1, Skills 2… columns which Glide can combine into one Skills column but that is not the case now (may be it should be). I have another sheet **ServiceRequests** and each service request has one skill (column name is ServiceType but it has the same values as skills added by users). So the question is how can I display only those service requests to user that match their skills?

---

<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, 2020, 2:23am UTC](https://community.glideapps.com/t/best-way-to-filter-list-data/12912/2 "2020-07-22T02:23:54Z")

</div>

In the Skills sheet, have them writing to an array column as you have said.

In the ServiceRequest sheets, probably you can have an If \> Then \> Else column to bring the user email in, make a single relation matching the user email there to the one in your Skills sheet. Have a lookup to bring the skills array column over.

Then finally make a relation matching the single skill of each service request to the lookup skills array column. Show the skill to the user only when the relation is not empty.

---

<div class="post-metadata">

**Author:** ![Navjeet\_Chabbewal](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/navjeet_chabbewal/32/10663_2.png) [@Navjeet\_Chabbewal](https://community.glideapps.com/u/Navjeet_Chabbewal)\
**Post date:** [July 25, 2020, 6:38pm UTC](https://community.glideapps.com/t/best-way-to-filter-list-data/12912/3 "2020-07-25T18:38:04Z")

</div>

@ThinhDinh Not sure how If-then-else can be used to bring service provider’s email from **skills** sheet into **service requests** sheet. Looks like if-then-else only works on columns in current sheet and service provider’s email is not there in service request sheet. I can bring in all service provider’s emails from **skills** sheet using a relation but then how do I use that as relations can only be used as a filter in a very limited way.

---

<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 26, 2020, 7:13pm UTC](https://community.glideapps.com/t/best-way-to-filter-list-data/12912/4 "2020-07-26T19:13:59Z")

</div>

> [@ThinhDinh](#):
>
> In the ServiceRequest sheets, probably you can have an If \> Then \> Else column to bring the user email in

Either way will work, but a template column would be easier to get the signed in user’s email from the user profile sheet.

I would maybe do it different if you keep the multiple rows for each user skill. You can create a template of the skill and email in the skills sheet. Then create a template in the request sheet of the skill and the user profile email. Then create a relation like @ThinhDinh mentioned to link the template in the request sheet to the template in the skills sheet. Show the request if the relation is not empty. If you change to the array of skills in the skills sheet, then I think @ThinhDinh’s idea will work for you.

---

<div class="post-metadata">

**Author:** ![Angelia\_Baxter](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/angelia_baxter/32/789_2.png) [@Angelia\_Baxter](https://community.glideapps.com/u/Angelia_Baxter)\
**Post date:** [July 27, 2020, 5:36am UTC](https://community.glideapps.com/t/best-way-to-filter-list-data/12912/5 "2020-07-27T05:36:43Z")

</div>

> [@Jeff\_Hager](#):
>
> Either way will work, but a template column would be easier to get the signed in user’s email from the user profile sheet.

Hi Jeff,  
What is a template column? Is this something I should use when I have a user that shows up in multiple areas of the app? For instance, different roles, categories, events? Is it cleaner to have one big sheet with all of the items linked to them in it, then have a list of categories, roles, and relate back to the user list or should I be doing this in a different way?

---

<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 27, 2020, 11:51am UTC](https://community.glideapps.com/t/best-way-to-filter-list-data/12912/6 "2020-07-27T11:51:26Z")

</div>

> **[Template Column](https://docs.glideapps.com/all/reference/data-editor/computed-columns/template-column)**
>
> Create labels or messages based on other columns in your table

If you have records that are specific to the user, you should only need to store the email of the user in that record. If you have records that are specific to users of a certain role, then the record should have the role type in it. Any user data should be stored in a user profile sheet where you keep details about each user and their role. You can then enable and use user profiles to control what each user can see.

[https://docs.glideapps.com/all/reference/privacy-and-per-user-data/user-profiles](https://docs.glideapps.com/all/reference/privacy-and-per-user-data/user-profiles)

---

<div class="post-metadata">

**Author:** ![Coupons\_Deal](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/coupons_deal/32/9734_2.png) [@Coupons\_Deal](https://community.glideapps.com/u/Coupons_Deal)\
**Post date:** [July 27, 2020, 1:34pm UTC](https://community.glideapps.com/t/best-way-to-filter-list-data/12912/7 "2020-07-27T13:34:04Z")

</div>

@Navjeet_Chabbewal The requirement seems slight confusing.  
Users add skill. So multiple users can add same skills? Right.

Which means when you displayed ServiceRequests to user, the same servicerequest show to multiple users. Is this understanding correct?

If this is so, then you can create a relation from ServiceRequests to Skill sheet and then use lookup to get all email for that ServiceRequest match. So for that ServiceRequest(basically skill) you will get all the email id’s.  
Then in UI set filter condition to “Signed In User”.

---

<div class="post-metadata">

**Author:** ![Navjeet\_Chabbewal](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/navjeet_chabbewal/32/10663_2.png) [@Navjeet\_Chabbewal](https://community.glideapps.com/u/Navjeet_Chabbewal)\
**Post date:** [July 31, 2020, 2:50am UTC](https://community.glideapps.com/t/best-way-to-filter-list-data/12912/8 "2020-07-31T02:50:22Z")

</div>

Thanks @Coupons_Deal that worked.

---

<div class="post-metadata">

**Author:** ![Coupons\_Deal](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/coupons_deal/32/9734_2.png) [@Coupons\_Deal](https://community.glideapps.com/u/Coupons_Deal)\
**Post date:** [July 31, 2020, 8:06am UTC](https://community.glideapps.com/t/best-way-to-filter-list-data/12912/9 "2020-07-31T08:06:45Z")

</div>

Happy to Help 🙂
