Dataview help - tasks with tags OR in files with tags

What I’m trying to do

I maintain a file for each project I’m working on and that file contains dataview queries to capture tasks related to that project - all based on the tag (#project/customer) in the file. So my main project file has that tag, all meeting notes have that same tag. Occasionally, I’ll think of a task I need to do for that project and put it in my Daily Note with that same tag in the task itself. My dataview query works fine when I am searching for tasks in files that have that tag OR tasks that have the tag in the description, but I’m having trouble combining them.

Things I have tried

This is my current dataview query:

TASK
WHERE 
 	 !completed 
	 AND (
 		 contains(tags, this.file.etags[0]) 
 		 OR contains(text, this.file.etags[0])
 		 )

What I get: This returns a list of ONLY tasks with the tag explicitly in the description. I have tasks in a file that is tagged (though the tasks themselves aren’t because that seems duplicative), but this query is not capturing them.

It feels like I must be missing something obvious, but I’m just not seeing it.

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