Basic dataview query not working?

What I’m trying to do

I’m building my own PARA vault from scratch for project management and using dataview to filter tasks (which I have built out as separate notes). I’m trying to link together my projects, tasks and areas via properties. So, in the example below I’m trying to link a project file (“Rewrite Chapter 5”) to a task (“review chapter 5 outline”) wherein the project property for the task is “[[Rewrite Chapter 5]]”. However, when I write the dataview query to display a list of tasks with the project property “[[Rewrite Chapter 5]]” inline on the project note, there is no result.

Here is the metadata for the task:
Screenshot 2024-09-02 at 15.53.50

and where is the query to display on the project page:

It seems very simple, but could someone please explain why this isn’t working?

Thank you!

I have not tested it, but if I have to guess is that in your yaml you started a list with only 1 item for the project property. That will be seen as a array with 1 item.

I think it will be solved if you have it like this:

project: “[[Rewrite Project 5]]”

Now I tested it myself and found out that this works:

yaml in review note like this:

---
project: "[[Rewrite Chapter 5]]"
---

In the note Review Chapter 5 you need have the Where line like this:

WHERE project = [[Rewrite Chapter 5]]

or

WHERE project = this.file.link

The last option makes your code dynamic and will still work if you change the title of your note Rewrite Chapter 5.

1 Like

Whenever you’re using a list for the values you’ll need to do contains(project, link("Rewrite Chapter 5")). Using the equal sign is only valid if it’s listed in a non-list context, as @JayKim eludes at with the different syntax to define project.

1 Like

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