# Linking mutiple items to multiple items

**URL:** https://community.glideapps.com/t/linking-mutiple-items-to-multiple-items/52316
**Category:** Ask for Help
**Created:** [October 23, 2022, 5:05am UTC](https://community.glideapps.com/t/linking-mutiple-items-to-multiple-items/52316 "2022-10-23T05:05:53Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Viniket](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/viniket/32/42203_2.png) [@Viniket](https://community.glideapps.com/u/Viniket)
#### Post date: [October 23, 2022, 5:05am UTC](https://community.glideapps.com/t/linking-mutiple-items-to-multiple-items/52316/1 "2022-10-23T05:05:53Z")

</div>

Hi fellow Gliders,

I want to link multiple items from one tab of a sheet to multiple items from another tab of the same sheet. I tried using relations & multiple relations but was unable to figure out a way to do so.  
For example: One tab has a list of colors (red, blue, green) and the other tab has a list of shirts. The behavior that I want to create is that on the UI I want to show the list of colors followed by list of shirts. When I click on ‘red’ then all the shirts having those colors should list down. When I click on any of the ‘shirts’ then all the colors of that particular shirt should list down.

Can you please help me with this?

Appreciated.  
Thanks,  
Viniket

---

<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 23, 2022, 5:33am UTC](https://community.glideapps.com/t/linking-mutiple-items-to-multiple-items/52316/2 "2022-10-23T05:33:25Z")

</div>

In your shirts table, how do you identify the colour of each shirt?  
Is there a column that identifies the colour?

---

<div class="post-metadata">

### Author: ![Viniket](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/viniket/32/42203_2.png) [@Viniket](https://community.glideapps.com/u/Viniket)
#### Post date: [October 23, 2022, 6:14am UTC](https://community.glideapps.com/t/linking-mutiple-items-to-multiple-items/52316/3 "2022-10-23T06:14:21Z")

</div>

Yes in the Shirts table there are multiple columns for the color of that shirt. For example if a shirt has 3 Colors then red, white and black are listed in unique columns against that single row.

And in the Colors table I have listed down each shirt in a separate column against a particular color.

---

<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 23, 2022, 6:32am UTC](https://community.glideapps.com/t/linking-mutiple-items-to-multiple-items/52316/4 "2022-10-23T06:32:04Z")

</div>

> [@Viniket](#):
>
> Yes in the Shirts table there are multiple columns for the color of that shirt. For example if a shirt has 3 Colors then red, white and black are listed in unique columns against that single row.

That’s not a good way to do it, and will be quite difficult to work with.  
You’d be much better off using a single column for the available colours. Something like the following:

![Screen Shot 2022-10-23 at 2.25.02 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/2/a/2ab30c788533972e4966a16eeac88cbe70ce6719.png)

> [@Viniket](#):
>
> And in the Colors table I have listed down each shirt in a separate column against a particular color.

Again, not good. Better to just list all the colours in a single column, like so:

![Screen Shot 2022-10-23 at 2.28.36 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/6/4/64bbb5267dc205d26e156af4875a76108d1b1ef7.png)

Using the above, to get a list of shirts for each colour:

- In the Shirts table, create a Split Text column from the Colours column. This will result in an array of colours for each shirt.
- In the Colours table, create a _multiple_ relation column that matches each Colour to the array of Colours in the Shirts table.

---

<div class="post-metadata">

### Author: ![Viniket](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/viniket/32/42203_2.png) [@Viniket](https://community.glideapps.com/u/Viniket)
#### Post date: [October 25, 2022, 7:14am UTC](https://community.glideapps.com/t/linking-mutiple-items-to-multiple-items/52316/5 "2022-10-25T07:14:34Z")

</div>

Thanks Darren Murphy, this sounds good for structuring the data. I did as you instructed but I am now struggling with how to show it on the UI.  
When I click on a shirt, it should list down the colors it has on a new page where the shirt name will be mentioned at the top and then the list of it’s colors shown below it.

Also, if I click on a color then a new page should list down all the shirts mapped to it.

Thanks in advance for your time and efforts, really appreciate it.
