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.
add a column in the recipes sheet for type (eg Vegan).
In the Glide Data Editor, create a template column that concatenates the Day and Type (eg Day1-Vegan)
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.
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
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
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’.
@Robert_Petitto That could be. I also still have the Multi-Match Filter example in 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.