What I’m trying to do
I have a law studies database wherein each ‘Topic’ page has a list property called ‘Subject’, which contains a link to one or more ‘Subject’ pages. For example, the ‘Offer’ topic page has a ‘Subject’ property that contains a link to the ‘Contracts’ subject page.
I’m trying to make a simple Dataview TABLE query for each subject page, that shows all files in a certain folder (/Law/Topics/) where the ‘Subject’ property contains a link to the current file. My table gets no results as soon as I apply the WHERE condition.
Here’s the basic table script:
TABLE Week, Subject
FROM "/Law/Topics"
WHERE contains(Subject, this.file.link)
The strange thing is, when I run the query without the condition, the ‘Subject’ column shows links appearing three times for each entry, separated by a pipe character. See the below screenshot for an illustration.
Can anyone tell me why the triplicate names are appearing, and whether that is likely to be the cause of the query not working?