Excluding links in dataview results

What I’m trying to do

I’m trying to use dataview to create a table of files within a specific folder where the outgoing links of each file are displayed. This thread answered my original question perfectly.

But all of these files have a “Topic MOC” link that I’d like to exclude from the links column. Is there a way to do this?

Things I have tried

I’ve looked at the Dataview documentation and searched this forum. My current query is:

TABLE sections, characters, file.outlinks AS "🔗" 
FROM "6. Sources/Huang Di Neijing Original"

I tried adding an expresion after the.outlinks to exclude the MOC file (I can’t find what I did exactly!!) but it didn’t work. Thanks!

Another way I don’t mind doing it is to have a field in the YAML with “Key terms” where I manually add the links. But I’m struggling to get that to work too.

Does this work?

```dataview
TABLE 
	sections,
	characters,
	filter(file.outlinks, (l) => l != [[Topic MOC]]) as 🔗
FROM
	"6. Sources/Huang Di Neijing Original"
```

Yes!! Exactly what I was looking for. Works perfectly, thank you!

The second thing I proposed I also have a use case for. Is that something that’s possible? Putting a link in the YAML?

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