What I’m trying to do & Things I have tried
I have a set of notes, each of which has items I need to collect, and the quantity to collect. Not actually a recipe, but similar to it, and easier to explain that way.
Let’s say the items I need to collect are eggs and milk.
My note for pancakes might be;
---
eggs: 2, fresh, room temperature
milk: 1 cup
---
A separate note for mufins might be:
---
milk: 1 cup
---
I can get a list of all the recipes that call for eggs and how many they need fairly easily. Using this:
TABLE WITHOUT ID
"eggs" as NAME, file.link AS "RECIPE", "text", eggs as "QUANTITY"
FROM "This week's recipes"
WHERE eggs
I get something like:
NAME | RECIPE | “text” | QUANTITY |
---|---|---|---|
eggs | pancakes | “text” | 2, fresh, room temperature |
[!unrelated]-
(unrelated issue: the quotations around text seem to show up, which is not what I expected,
and in fact, I would like the “text” column to be blank. These are separate issues)
Likewise for milk:
NAME | RECIPE | “text” | QUANTITY |
---|---|---|---|
milk | pancakes | “text” | 1 cup |
milk | muffins | “text” | 1 cup |
Some recipes don’t have milk, some have other ingredients, and most have properties unrelated to either of these, that I do not want to appear.
What I want is this:
NAME | RECIPE | text | QUANTITY |
---|---|---|---|
eggs | pancakes | 2, fresh, room temperature | |
milk | pancakes | 1 cup | |
milk | muffins | 1 cup |
One table, that lists all the ingredients/qtys I need to gather, and only that.
Is there any way to do this? I know I could do something like this (my syntax may be off):
TABLE WITHOUT ID
"eggs" as NAME, file.link AS "RECIPE", "text", eggs as "# Eggs", milk as "# Milk"
FROM "This week's recipes"
WHERE eggs or milk
but that would create multiple columns, and only one line per file, I think. I want one line per occurrence of each of the chosen properties, even if they are from the same file.
I have searched for recipes, but the ones I found used different setups (tags, not properties, not dataview, etc.)