Grouping a dataview list under tag headers

I have been trying to wrangle dataview to give me the following list structure from tagged files in a folder. The district group headers I desire are encoded in the file header.

District_1
⠀Establishment_a
⠀Establishment_b
⠀Establishment_c
District_2
⠀Establishment_c
⠀Establishment_d

Where each file is a named establishment and has a yml header that looks like this:

---
District: District_1

tags: 

- '#tag1'
- '#tag2'
- '#tag3'

---

Some of the tags are shared by all establishments while others differ, I don’t want to see the tags in the resulting dataviewer list. I just want grouped links of establishments where each link is simply the filename and they are organized underneath their corresponding District header as revealed by the yaml. Is this possible?

This code gets my in the neighborhood…

list District
From #tag1 
Sort District

It provides the list in the following form alphabetical by District and then Establishment:

Establishment_a: District_1
Establishment_b: District_1
Establishment_c: District_1
Establishment_d: District_1
Establishment_d: District_2

Establishment_k: District_8

To something like:

---
District: District_1
tags: 
  - tag1
  - tag2
  - tag3
---

try this:

LIST WITHOUT ID
"**" + District + "**<br>" + join(rows.file.link, "<br>")
FROM #tag1
WHERE District
GROUP BY District

That absolutely works! Thank you very much for the help, I really appreciate it.

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