Create a hierarchical list of MOCs

What I’m trying to do

My library is setup with hierarchical MOCs

Home
*MOC_Data
**MOC_AI
note 1
note 2
**MOC_Databases
note 3
note 4
*MOC_Software
**MOC_Google Analytics

I want to use dataview/ dataviewjs to return a hierarchical list of MOCs

*MOC_Data
**MOC_AI
**MOC_Databases
*MOC_Software
**MOC_Google Analytics

Things I have tried

This gets me a list of all the MOCs, but not in hierarchical view

LIST
WHERE contains(file.name, "MOC_")

How is your setup hierarchical? Is it folders, is it just the list level in one of the notes?

just the list level in one of the notes

I’m struggling to see the structure of your files and folders, and what you want to list in your output.

But it do seem like you might need to use dataviewjs to some extent, as an ordinary LIST query produces its main entries on just one level.

@DrPaul did you find a good solution? I see the hierarchy in your setup, mine is done the same way

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