Links in list type property show up in triplicate

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?

Can you share an example of a note with frontmatter that causes this problem?

Yes, here’s an example in source mode - I can see here that the ‘Subject’ link seems to be using an alias, so that one version shows the folder it’s in, the other is simply the name of the note. I don’t believe there is another note called ‘Equity and Trusts’ in my vault, so this oughtn’t to be necessary. Something occurred to me though: these notes were imported from Notion. I wonder if the importer created the aliases as a safeguard against duplicates?

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