I am trying to filter tasks by a property in the frontmatter.
So far i realized it works to insert the inline query inside the tasks code block like this:
```tasks
tags does not include `=this.tag`
```
And with “tags include =this.tag” it doesn’t filter any filter.
With “tags does not include =this.tag” it filters just all tasks.
So in my conclusion, the Tasks-Plugin recognizes some kind of input, but I don’t get it to work correctly.
I know I could switch to dataview for tasks, but as I have to all my task-management working with the task-format I would prefer to keep it this way.
I’m glad for any idea or work-around on how to get this to work.
I reckon you’ve discovered that you can’t mitch stuff from dataview, aka the `= this.tag`, with the other stuff from tasks plugin like you’ve done. So you need to choose which plugin you want to use.
Both dataview and tasks do you use the same source text for tasks, and can in most cases be queried by either plugin. The major downside to this is that dataview doesn’t handle recurring tasks out of the box.
That aside I played around a little, and ended up with this test note:
---
Tags: f92745, that
aTag: "#this"
---
questionUrl:: http://forum.obsidian.md/t//92745
- [ ] A task #this and #that
- [ ] Only #that
- [ ] Or only #this task
- [ ] Not any of the above
## Not this
```tasks
tags does not include #this
path includes {{query.file.path}}
```
## Only this from aTag
```tasks
path includes {{query.file.path}}
filter by function task.tags.find ( (tag) => task.file.property('aTag').includes(tag) ) && true || false
```
## Only that from tag
```tasks
path includes {{query.file.path}}
filter by function task.tags.find ( (tag) => task.file.property('tags').includes(tag.substring(1)) ) && true || false
```
Which seemingly seems to work for picking up either this or that tasks from the current file. Hopefully, you could adapt that to something working for your case.
The queries are a little tricky since we need to use filter by function to be able to access te task.file.property() to get access to the local property. And then furthermore we need to loop on the various tags of the task using task.tags.find().