Dataview with Frontmatter Tags

What I’m trying to do

Hey,
I’m a big fan of Dataview and the new properties.
So far, I’ve been incorporating Dataview into my templates like this:

tags:: #Projekt/

TABLE Status, Priorität, Verantwortlich
FROM #Projekt/
WHERE Status = "aktiv" or Status = "Abgeschlossen"
SORT file.name DESC

This means I always have to adjust Dataview after modifying the properties (from).

tags:: #Projekt/Solar

TABLE Status, Priorität, Verantwortlich
FROM #Projekt/Solar
WHERE Status = "aktiv" or Status = "Abgeschlossen"
SORT file.name DESC

Isn’t there a way to do this automatically? Subsequent adjustments have been unsuccessful so far. Because ultimately, the information is present in the front matter.

Things I have tried

From this.file.tags

From file.tags

From any(contains(file.tags, this.file.tags))
WHERE Status = “aktiv” or Status = “Abgeschlossen”
SORT file.name DESC

Either I don’t get any result or an error. What am I doing wrong?
I would appreciate a response. Thank you

I don’t think you can do expressions in the FROM clause, those belong in the WHERE clause, and of your alternatives, I think this variant might work for you:

```dataview
TABLE Status, Priorität, Verantwortlich
WHERE any(contains(file.tags, this.file.tags))
WHERE Status = "aktiv" or Status = "Abgeschlossen"
SORT file.name DESC
```
1 Like

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