My English is also not the best, so I think I have not explained myself the best. Thank you for your patience.
For better or worse, I do not use tags. Instead I give a note a dataview key called “sub” (Like Reddit). So, sub:: Goal for goals, sub:: Priority for priorities.
Here is how I query for goals (in this case active goals):
TABLE WITHOUT ID link(file.link, file.title) AS "active goal", length(file.inlinks) as "total priorities"
FROM !"_templates"
WHERE sub = [[Goal]]
AND completed = [[Active]]
If the “length(file.inlinks) = 0”, that is my signal to write a priority note for it, at which point “length(file.inlinks) = 1”
The problem is I have other supporting files that link to the goals notes (they have key sub:: [[note]]. They are also inlinks to the goals note. I want to exclude them from the query.
If I may rewrite your example:
- “Goal” note has inlinks from every note labelled
sub:: [[Goal]]. Admittedly confusing but I don’t think relevant to this scenario.
- “Goal X” note has inlink PriorityX. Yes! The query works! No Priority note needed.
- “Goal Y” note has no inlinks. Yes! The query works! I write Priority note
- “Goal Z” note has inlinks fileA, fileB, fileC. Oops! The query will not tell me to create a priority note this goal because “length(file.inlinks) = 3”
I think the any(array) operator may work. I just don’t understand the examples from blacksmithgu and Dataview Reference