How to count incoming links of files in Dataview plug-in?

Hello experienced Dataview users!

What I’m trying to do

In a manner similar to the MOC (Map of content) approach, I am creating links to new topic files (let’s call them MOC files) as I go about my day working on various things. Now I want to create a dataview table that shows those MOCs and their incoming links. I don’t want to go into each MOC and view their list of backlinks, but would like a summary table that shows the number of backlinks for each MOC. This can help me decide which MOCs are more important (having more backlinks) and need to be worked on.

What I have tried

I have tried the following code:

table file.day as Created, length(file.inlinks) as Citations
from #MOC

The code does not work, as I realize that file.inlinks does not return an array that is normally used in the yaml header. I have not tried anything from the newly added dataviewjs section because I don’t know JS and don’t understand what I’m reading in the documentation. I would appreciate any help or suggestion!

3 Likes

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