Media Companion does not process dataview codeblocks?

[edit: turns out this was likely a media companion plugin problem, not a problem with dataview. see below]

What I’m trying to do

I have a bunch of so-called sidecar files for (non.md) files.

For example: file.ext.sidecar.md is the sidecar file for file.ext

In the sidecar, I want to list the backlinks to file.ext (i.e. the files that reference it)

To be clear, I want to avoid having to hard-code the filename to each file.

Things I have tried

Normally, this would give me the backlinks to a file:

LIST 
FROM [[]] 

I want a list of backlinks to a related file–something like:

LIST 
FROM [[ replace(file.path, ".sidecar.md", "") ]] 

Another approach

TABLE  file.name, link( replace(file.name, ".sidecar", ""))
WHERE  contains(file.path, replace(file.path, ".sidecar.md", "") )

This seemed ot find the wrong files…!!!

Though I know that syntax is wrong. Is it possible, and how?

Thanks in advance for any help.

If I’ve understood correctly, then this query in your sidecar note will list all notes that link to the sidecar’s related note:

```dataview
LIST
WHERE contains(file.outlinks, link(replace(this.file.path, ".sidecar.md", "")))
```

Okay, thank you for that. That really helped…not because it solved the problem, but because it helped me realize I have a completely different problem.

I was using the Media Companion plugin to manage the sidecar files. Your code shows empty dataview results in the sidebar sidecar, BUT if I open the file in a regular tab, it works. I suspect that the sidebar is not processing the dataview code correctly, or something like that…I will take it up with them…