Help with Dataview Query based on current files inline field value

Things I have tried

Nothing yet, as I’m not sure where to start.

What I’m trying to do

I would like to perform a query which matches with notes that have an inline field value matching the current files.

Something like

issue_type:: bug

TABLE id, status from #issues WHERE issue_type = this.file.fields.issues_type SORT id ASC

I have read through the dataview docs and searched through the forum but I haven’t found how to do this.

TLDR: How do I dynamically get the value of a field for the current file?

Thanks in advance.

Only implicit fields use the prefix “file”. Custom fields don’t.
So, if you write WHERE issue_type = this.file.fields.issues_type why in first part you don’t use the prefix and in second part you use file.fields?

TABLE id, status
FROM #issues
WHERE issue_type = this.issue_type
SORT id ASC
1 Like

Awesome! That’s exactly the tip I needed!
Thank you!

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