How to aggregate lists from same heading across multiple daily notes preserving indentation?

What I’m trying to do

I have a ## Wins heading in my daily notes that has a simple list underneath it. The list can sometimes have multiple levels of indentation.

I have a weekly note where I’d like to have a dataview aggregate all of the ## Wins items, grouped by a link to the Daily Note filename.

Things I have tried

The query below is my best effort, but it does not preserve the formatting of indentation.

LIST rows.item.text
FROM "journal/dailies"
FLATTEN file.lists as item

WHERE week = [[2023-W48]] AND lower(meta(item.section).subpath) = "wins" AND length(item) > 15

GROUP BY link(item.section, as myFile SORT meta(myFile).display DESC

To my knowledge I don’t think you can get LIST queries to preserve any multi-level indentation (besides presenting a list as one of the list items). Especially when you use FLATTEN file.lists it removes the indentation level of the items, as far as I know, and consider each item in a list at any level as just an item.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.