What I’m trying to do
I’m trying to create a template that will automatically display all links linked to this note. Once I use this template, I no longer need to manually enter the dataview query to query what links this note connects to.
Things I have tried
This is my code, but it didn’t work. Thanks for reading my problem!
from "[[" + this.file.name + "]]" OR from outgoing("[[" + this.file.name + "]]")
dv.pages("[[" + dv.current().file.name + "]]")
// Sort by YAML created field
.sort(b => b.created, 'desc')
.map(b => [b.file.link, b.file.folder.replace(/\//g, ' ‣ ').replace(/^\d+ (.+)/, '$1')])
I’m really not Dataview fluent but maybe this could work too ( ) ?
FROM [] OR outgoing([])
(Tested the query in one of my note and it seemed to return the appropriate results)
From the Dataview documentation:
- You can implicitly reference the current file via
[] lets you query from all files linking to the current file.
OMG you just saved me so much time! This works really well and so simple! Thanks so much!
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.