i’m trying to set up a dataview query adapted from the following (sort of like a running logbook). a similar implementation is Inline metadata query on the same page for many blocks/sections - #2 by holroy.
the idea is that i have a big weekly note with each day as its own bullet, and i want to pull out various things from each day (e.g. media i’ve consumed and my impressions of it, work progress, etc…) (for various reasons i don’t want to use daily notes )
an example weekly page setup is like this:
<week #>
<some properties>
- day:: monday
- consumed:: <some media>
- impression::
- impression::
- gratitude::
- other_field::
- day:: tuesday
- consumed:: <some media>
- impression::
- impression::
- consumed::
- impression::
- other_field::
- day:: wednesday
- you_get_the_idea::
the goal is something like this:
date | consumed | impressions |
---|---|---|
mon | xxx | 2 bullet pts |
tues | xxx | 2 bullet pts |
tues | xxx | bullet pt |
wed | xxx | bullet pt(s) |
things i’ve tried
after searching a lot on “flatten” and “group by” and “nested sub bullets”, etc, the closest ive gotten to what i want is this:
table without id day, consumed, impression as impressions
from <weekly notes>
where day and consumed
flatten day
flatten file.lists as ListItems
flatten ListItems as ListItem
where ListItem.consumed
flatten ListItem.consumed as consumed
there’s 2 problems with this still:
impression::
doesn’t return as intended:
i can’t get it to return only the impression::
for a specific consumed::
item.
flatten list(ListItem.consumed.impression) as impression
: returns an indexing error, for some reasonflatten list(impression)
: returns every line withimpression::
and not just the ones associated under a specificconsumed::
itemflatten impression
: results in different things depending on the upstream stuff in the query, but for the most part doesn’t really work when i have multipleimpression::
bullets under oneconsumed::
bullet.
- returns an infinite amount of days…
the list starts to loop over itself at some point (not really sure why) – it’ll start to pair different days with different media…
would love some ideas on what’s happening here or some suggestions! is the solution to just create daily notes? maybe do something different with the metadata fields? dataviewjs??? thanks!