# Many to many with pivot table with condition on pivot table's value

**URL:** https://community.glideapps.com/t/many-to-many-with-pivot-table-with-condition-on-pivot-tables-value/20762
**Category:** Ask for Help
**Tags:** actions
**Created:** [January 5, 2021, 1:01pm UTC](https://community.glideapps.com/t/many-to-many-with-pivot-table-with-condition-on-pivot-tables-value/20762 "2021-01-05T13:01:18Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![hana1026](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/hana1026/32/19271_2.png) [@hana1026](https://community.glideapps.com/u/hana1026)
#### Post date: [January 5, 2021, 1:01pm UTC](https://community.glideapps.com/t/many-to-many-with-pivot-table-with-condition-on-pivot-tables-value/20762/1 "2021-01-05T13:01:18Z")

</div>

So I have 3 sheets here

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/4/8/48af5d7f8e2ac0eaa3bf96520a7541367222e60c.png)

I would like to access store 1 → \* stocks.sku through pivot table and filter by handling flag = 1.

It is very simple many to many relation in RDB concept,  
but Im struggling to implement this with Glide relation feature, any help?

---

<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: [January 5, 2021, 1:17pm UTC](https://community.glideapps.com/t/many-to-many-with-pivot-table-with-condition-on-pivot-tables-value/20762/2 "2021-01-05T13:17:27Z")

</div>

So the result would be only the first row in the pivot table?

---

<div class="post-metadata">

### Author: ![hana1026](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/hana1026/32/19271_2.png) [@hana1026](https://community.glideapps.com/u/hana1026)
#### Post date: [January 5, 2021, 1:19pm UTC](https://community.glideapps.com/t/many-to-many-with-pivot-table-with-condition-on-pivot-tables-value/20762/3 "2021-01-05T13:19:13Z")

</div>

I want all the correspondent rows in pivot table where handling = 1

---

<div class="post-metadata">

### Author: ![Lucas\_Pires](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/lucas_pires/32/64863_2.png) [@Lucas\_Pires](https://community.glideapps.com/u/Lucas_Pires)
#### Post date: [January 5, 2021, 1:32pm UTC](https://community.glideapps.com/t/many-to-many-with-pivot-table-with-condition-on-pivot-tables-value/20762/4 "2021-01-05T13:32:29Z")

</div>

I don’t know if I understand completely, but if you do a Relation _Store - store1_ \> _store\_stock\_handling - Store_ the result in handling column will be 1 and 0 (first and second row correspondent in Pivot Table)

Is this what you need?

---

<div class="post-metadata">

### Author: ![hana1026](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/hana1026/32/19271_2.png) [@hana1026](https://community.glideapps.com/u/hana1026)
#### Post date: [January 5, 2021, 2:29pm UTC](https://community.glideapps.com/t/many-to-many-with-pivot-table-with-condition-on-pivot-tables-value/20762/5 "2021-01-05T14:29:41Z")

</div>

First, I want Store store1 -\> store\_stock\_handling.stock1, stock2 (regardless of the value in handling is 1 or 0, I want all relational stocks from store1)

And then filter them by handling = 1.

---

<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: [January 5, 2021, 2:33pm UTC](https://community.glideapps.com/t/many-to-many-with-pivot-table-with-condition-on-pivot-tables-value/20762/6 "2021-01-05T14:33:17Z")

</div>

Sounds simple enough. A relation column to link the store in the Stores sheet to the store in the Handling sheet will give you all matches for each store. When you display that relation as a list, you can then set a filter on that list to only show the rows that have handling of 1.

---

<div class="post-metadata">

### Author: ![NoCodeAndy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/nocodeandy/32/62530_2.png) [@NoCodeAndy](https://community.glideapps.com/u/NoCodeAndy)
#### Post date: [January 17, 2024, 4:58pm UTC](https://community.glideapps.com/t/many-to-many-with-pivot-table-with-condition-on-pivot-tables-value/20762/7 "2024-01-17T16:58:23Z")

</div>


