I’m trying to write a query that groups tasks with multiple tags into the same group regardless of the order of the tags written as long as the combination of the tags is the same.
Just as the background information, I use tags to organize my tasks. I use one main tag that identifies the type of task, but also use other tags to indicate whether if it’s something I like to work on today, this week or later or any other information that I would like to note as a tag.
Things I have tried
To achieve what I’m trying to do, I wrote a query that shows a list of tasks with multiple tags by using the task.tags.join command. The problem that I’m having is that I write tags in inconsistent order which is creating multiple groups that essentially has the same combination of tags.
My query is something like below:
not done
tag includes Work
group by function task.tags.join(" & ")
When I execute this query, it would have groups like
“#Work & #Today”, but there will be another group named
“#Today & #Work” depending on the order of the tags I wrote in the tasks.
Thank you for the input! Could you elaborate on what you meant by you are not sure if this can be done in Tasks? Is there a way to sort the tags in other methods?
Thank you holroy!
Your dataview query achieved what I wanted to do. I didn’t know how to use dataview until now, but this definitely will get me going
But I still have one issue. Your query returns the tasks that I want to show specified with the FROM command, but it also shows other tasks that do not have the tag.
I can’t seem to find a pattern or reason for the tasks that are erroneously showing up.
Do you have any idea why this would be the case?