How to use this.file.link in this query in Dataview?

I try to create a generic query that lists all pages with a link to the current page where the current page is not yet linking to that other page.

For my specific ‘This Page’ this query works:

LIST FROM [[This Page]] AND !outgoing([[This Page]])

I tried to make a generic snippet, like:

LIST FROM this.file.link AND !outgoing(this.file.link)

… but that results in:

Dataview: Error:
– PARSING FAILED --------------------------------------------------

1 | LIST FROM this.file.link AND !outgoing(this.file.link)
| ^

Expected one of the following:

‘!’, ‘(’, ‘-’, ‘csv(’, ‘outgoing(’, file link, string, tag (‘#hello/stuff’)

1 Like

Thanks for the very clear examples of what you tried! You are almost there! this only exists in the one-liner dataview queries that start with = (which don’t render in Live Preview as of now). Instead, dataview documentation suggests either [[]] or [[#]] for the current page in queries like yours. Does replacing this.file.link in both spots in your query with one of those options work?

4 Likes

Thank you @scholarInTraining !

1 Like

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