# Relation multiple factors

**URL:** <https://community.glideapps.com/t/relation-multiple-factors/27747>\
**Category:** Ask for Help\
**Created:** [June 7, 2021, 3:55pm UTC](https://community.glideapps.com/t/relation-multiple-factors/27747 "2021-06-07T15:55:15Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Deborahlevyben](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/deborahlevyben/32/24085_2.png) [@Deborahlevyben](https://community.glideapps.com/u/Deborahlevyben)\
**Post date:** [June 7, 2021, 3:55pm UTC](https://community.glideapps.com/t/relation-multiple-factors/27747/1 "2021-06-07T15:55:16Z")

</div>

Hi Everyone!

I am trying to show in my app 3 different weekly meal plan: 1 omnivore, 1 vegetarian and one vegan.

In my data base I have:

- 1 tab Recipes - with the list of all the recipes and 1 column Day to indicate which day it is for.
- 1 tab My plan - the list of the days and some Multiple relation column to link the recipes to be shown for each day

I would like now, to add a column in my “Recipe” tab to indicate if the recipe is Omnivore, Vege or Vegan, and then add that as a condition in my Multiple relation tab to show “recipes, for the day, that is vegan” for example.

Is his doable?

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [June 7, 2021, 3:58pm UTC](https://community.glideapps.com/t/relation-multiple-factors/27747/2 "2021-06-07T15:58:27Z")

</div>

When it comes to relations, it’s almost always doable 😉

Real quick, by “day” do you mean a sequential Day number (Like Day 1) or weekday (like every Monday)?

---

<div class="post-metadata">

**Author:** ![Deborahlevyben](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/deborahlevyben/32/24085_2.png) [@Deborahlevyben](https://community.glideapps.com/u/Deborahlevyben)\
**Post date:** [June 7, 2021, 4:03pm UTC](https://community.glideapps.com/t/relation-multiple-factors/27747/3 "2021-06-07T16:03:43Z")

</div>

ooooh that’s good news 🙂

Just Day number 🙂

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [June 7, 2021, 4:04pm UTC](https://community.glideapps.com/t/relation-multiple-factors/27747/4 "2021-06-07T16:04:33Z")

</div>

Cool, here’s how:

1. add a column in the recipes sheet for type (eg `Vegan`).
2. In the Glide Data Editor, create a template column that concatenates the Day and Type (eg `Day1-Vegan`)
3. In the My Plan Sheet, you’ll need to create an identical template column. I imagine the ‘type’ is a value that lives in the user profile sheet? If so the template column in the My Plan sheet should reference this value so that for each user they get a `Day1-(type)`.

Use this template column as the relation from the My Plan sheet to the recipe Sheet.

---

<div class="post-metadata">

**Author:** ![Deborahlevyben](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/deborahlevyben/32/24085_2.png) [@Deborahlevyben](https://community.glideapps.com/u/Deborahlevyben)\
**Post date:** [June 7, 2021, 4:06pm UTC](https://community.glideapps.com/t/relation-multiple-factors/27747/5 "2021-06-07T16:06:18Z")

</div>

Nice one! Let me try this out and tell you how it goes 🙂  
thanks a lot for the quick answer @Robert_Petitto

---

<div class="post-metadata">

**Author:** ![Deborahlevyben](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/deborahlevyben/32/24085_2.png) [@Deborahlevyben](https://community.glideapps.com/u/Deborahlevyben)\
**Post date:** [June 7, 2021, 4:13pm UTC](https://community.glideapps.com/t/relation-multiple-factors/27747/6 "2021-06-07T16:13:10Z")

</div>

@Robert_Petitto just one question, Is your step 2 to be done in the Recipe sheet or My plan sheet?

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [June 7, 2021, 4:13pm UTC](https://community.glideapps.com/t/relation-multiple-factors/27747/7 "2021-06-07T16:13:40Z")

</div>

It needs to be done in both sheets, but specifically I was referencing the recipes sheet in step 2

---

<div class="post-metadata">

**Author:** ![Deborahlevyben](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/deborahlevyben/32/24085_2.png) [@Deborahlevyben](https://community.glideapps.com/u/Deborahlevyben)\
**Post date:** [June 7, 2021, 4:15pm UTC](https://community.glideapps.com/t/relation-multiple-factors/27747/8 "2021-06-07T16:15:34Z")

</div>

Does that change something if Recipes can have multiple “types” and multiple “day”?

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [June 7, 2021, 4:18pm UTC](https://community.glideapps.com/t/relation-multiple-factors/27747/9 "2021-06-07T16:18:12Z")

</div>

Each recipe/day/type should be on its own line, then it will work as intended. How is it currently set up?

---

<div class="post-metadata">

**Author:** ![Deborahlevyben](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/deborahlevyben/32/24085_2.png) [@Deborahlevyben](https://community.glideapps.com/u/Deborahlevyben)\
**Post date:** [June 7, 2021, 4:19pm UTC](https://community.glideapps.com/t/relation-multiple-factors/27747/10 "2021-06-07T16:19:23Z")

</div>

YEs it is 🙂  
But 1 recipe can be shown in multiple days, and multiple types of plan. Because a recipe for a Vegan works just fine also for an omnivore. And in the weekly plan, that recipe can be for lunch both on Monday and Friday for instance

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [June 7, 2021, 4:20pm UTC](https://community.glideapps.com/t/relation-multiple-factors/27747/11 "2021-06-07T16:20:48Z")

</div>

I see. So a vegan should only see vegan but an omnivore can see vegan, vegetarian and omnivore recipes?

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [June 7, 2021, 4:36pm UTC](https://community.glideapps.com/t/relation-multiple-factors/27747/12 "2021-06-07T16:36:13Z")

</div>

Maybe an easier setup then, is to create an array column in the Recipes Google sheet by labeling 3 columns Type 1, Type 2, and Type 3.

For each recipe, populate Type 1 with Omnivore, Type 2 with Vegetarian and Type 3 with Vegan for any tags that apply to the user that can see that recipe.

Eg. Vegan dishes should only have Type 3 populated, vegetarian dishes should have Type 2 and 3 populated and omnivore dishes should have all 3 populated.

This creates an array column in Glide called “Type” with all the values in a singular cell.

Then, no more template column. Just relate the day column in the my plan to the day column in recipes, but on the inline list in the app, filter where the `Type` array column is the `User > Type`

---

<div class="post-metadata">

**Author:** ![Deborahlevyben](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/deborahlevyben/32/24085_2.png) [@Deborahlevyben](https://community.glideapps.com/u/Deborahlevyben)\
**Post date:** [June 7, 2021, 5:07pm UTC](https://community.glideapps.com/t/relation-multiple-factors/27747/13 "2021-06-07T17:07:11Z")

</div>

> [@Robert\_Petitto](#):
>
> Type

Thanks a lot Robert!

the only thing is that when I try to filter the “Inline list” I don’t have the option to put “Type array = User Type”

 ![Screenshot 2021-06-07 at 19.05.42](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/3/9/39d01f603ba50b8e1ddf52edeae919be0ed6e54a.png)

---

<div class="post-metadata">

**Author:** ![Deborahlevyben](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/deborahlevyben/32/24085_2.png) [@Deborahlevyben](https://community.glideapps.com/u/Deborahlevyben)\
**Post date:** [June 7, 2021, 5:17pm UTC](https://community.glideapps.com/t/relation-multiple-factors/27747/14 "2021-06-07T17:17:48Z")

</div>

@Robert_Petitto I found the way to overcome this blocker 🙂 I just added a filter with “or” condition for each type column to match the User type column 🙂

 ![Screenshot 2021-06-07 at 19.16.43](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/b/5/b52a0f944edbc4508d00a2586f340c16f7daed1f.png)

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [June 7, 2021, 5:27pm UTC](https://community.glideapps.com/t/relation-multiple-factors/27747/15 "2021-06-07T17:27:25Z")

</div>

@Jeff_Hager has this always been the case with array columns?

---

<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:** [June 7, 2021, 5:44pm UTC](https://community.glideapps.com/t/relation-multiple-factors/27747/16 "2021-06-07T17:44:57Z")

</div>

Possibly??? I feel like it’s never been possible to look into an array and pick out a value, so instead we would have to make a template or joined list and check with ‘includes’ or ‘included in’. But I’m not 100% sure.

This case might be easier to just create a basic text column that lists all of the Types for each recipe, then check with ‘includes’.

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [June 7, 2021, 6:20pm UTC](https://community.glideapps.com/t/relation-multiple-factors/27747/17 "2021-06-07T18:20:56Z")

</div>

Hm…you could be right…maybe I was thinking of the inapp filter / array column functionality about this very concept:

> [@Filtering issue: when i select 'vegan' also show me 'vegan, high protein'](https://community.glideapps.com/t/filtering-issue-when-i-select-vegan-also-show-me-vegan-high-protein/4783):
>
> Couldn;t find an answer to this so far in the forum, apologies if answered somewhere and I didn’t see it. I am trying to categorise meals and to come up with a solution so a meal doesn’t only have one category like ‘vegan’, but could also be ‘vegan, high protein’. Attached the screenshot how the filtering would currently exclude ‘vegan, high protein’ when looking for ‘vegan’. Thank you! [Screenshot 2020-02-20 at 01.58.44]

---

<div class="post-metadata">

**Author:** ![Deborahlevyben](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/deborahlevyben/32/24085_2.png) [@Deborahlevyben](https://community.glideapps.com/u/Deborahlevyben)\
**Post date:** [June 7, 2021, 6:41pm UTC](https://community.glideapps.com/t/relation-multiple-factors/27747/18 "2021-06-07T18:41:39Z")

</div>

I was actually looking for the In app filter but can’t find the feature. Is this something only for premium plans?

---

<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:** [June 7, 2021, 6:48pm UTC](https://community.glideapps.com/t/relation-multiple-factors/27747/19 "2021-06-07T18:48:15Z")

</div>

@Robert_Petitto That could be. I also still have the Multi-Match Filter example in [concepts.glideapp.io](http://concepts.glideapp.io) which fits that theme, but not quite the same case here.

@Deborahlevyben here is the in-app filtering documentation, but I only think this applies to the one of the list style views. I don’t think it’s available for an inline list in a details view.

> **[Filter](https://docs.glideapps.com/all/reference/design-and-structure/filter#in-app-filtering)**
>
> Filter your lists based on criteria

---

<div class="post-metadata">

**Author:** ![Deborahlevyben](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/deborahlevyben/32/24085_2.png) [@Deborahlevyben](https://community.glideapps.com/u/Deborahlevyben)\
**Post date:** [June 7, 2021, 8:56pm UTC](https://community.glideapps.com/t/relation-multiple-factors/27747/20 "2021-06-07T20:56:16Z")

</div>

Thanks a lot guys!! Super helpful as always!
