Making a table of outgoing links from the file that dataview is creating a table in

Things I have tried

TABLE eval
WHERE file.inlinks = this.file.name

What I’m trying to do

I’m trying to add a dataview table to a template that can then sort the outgoing links from the file that is created by the template by a value given in the metadata.

Basically, I want to have a table of all the files that have an incoming link from the file where this dataview table is created

Read this part of the plugin docs about the command FROM.

TABLE eval
FROM outgoing([[]])

You can also use the WHERE function, but you need to pay attention to this: file.inlinks, file.outlinks, file.tags, etc., are, by default, an array (even if only one value). If an array you can’t use “=”, you need to use the contains().

TABLE eval
WHERE contains(file.inlinks, this.file.link)

Another point, you can’t compare two different types of metadata: links are different from names. So, you can’t compare file.inlinks (links) with file.name (a string).

Thanks! That makes sense. Sorry, I’m very new to this

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