The sub-notes are automatically named based on the master note’s name.
E.g.:
master note: “I am the boss”
sub notes:
“I am the boss - you wish”
“I am the boss - keep dreaming”
Challenge
I want to add a dataview query that returns
a list (or table) of all sub-notes to which the master note links, BUT
only showing the part of the sub-note’s name after the delimiter " - "
I manage the first part fine, but showing only the partial file name of the sub-notes beats me.
Thank you.
Things I have tried
I went through the dataview documentation, tried snippets - even almighty ChatGPT - alas, to no avail.
I’m kind of surprised why your split is not working, as it does work in my case. So here are two queries two further explore your case:
```dataview
TABLE split(file.name, " - "), file.name
WHERE startswith(file.name, this.file.name)
```
```dataview
LIST WITHOUT ID link(file.link, split(file.name, " - ")[1])
WHERE startswith(file.name, this.file.name)
AND contains(this.file.outlinks, file.link)
```
In my simple test setup with three sub notes, where only the two first are linked from the master note, this results in the following output:
Your code works, if I put it in the master file - but not in the subs. However, you pointed me in the right direction and I found this solution:
LIST WITHOUT ID link(file.link, split(file.name, " - ")[1])
FROM "01 👻 Projects/🎞️ LP Videos"
WHERE startswith(file.name, split(this.file.name, " - ")[0])