obsidian dataview get files which has link to current file no talking, only query
- User
obsidian dataview get files which has link to current file
no talking, only query
- Assistantdataview
LIST FROM [[]]Replace
[]with your current file name including the brackets. For example, if your current file is named "Example", you should write[Example]. - User
Are there things like this: this.file.name?
I wanna make this: LIST FROM [[this.file.name]]
- Assistant
In Dataview for Obsidian, as of my last update, you cannot directly use something like
this.file.namewithin a Dataview query to dynamically filter pages that link to the current file. However, you can achieve a dynamic listing of files linking to the current file using JavaScript queries introduced in later versions of Dataview.Here’s how you can do it with a JavaScript query:
dataviewjsconst currentFileName = dv.current().file.name; dv.list(dv.pages(`[[${currentFileName}]]`).file.link);This JavaScript query does the following:
- Fetches the name of the current file.
- Searches for pages that link to the current file.
- Lists those pages.
Make sure JavaScript queries are enabled in your Dataview plugin settings to use this.