Some notes:
-
(about the re-use of other queries) Do you know what
regexreplace(Tasks.text, "\[.*$", "") AS Task
do? This is important to you?Tasks.text As Task
isn’t enough?
regexreplace(Tasks.text, "\[.*$", "") AS Task
do this: take the text of each task and remove everything from the first “[” to the end in the original text, i.e., for example, take- [ ] dickinson task with [priority:: 1] and keyword without tag [keyword:: week2]
and removes everything after “with”.
So, in the original query this is created to separate text from all metadata things (created with the format[key:: value]
, not with the format(key:: value)
. That’s why all metadata to extract are placed after the main text of the tasks.
In your tasks examples there’s no rule! That’s why you get weird results (for example, in the task- [ ] dickinson task with [priority:: 1] and keyword without tag [keyword:: week2]
if you want to see all text until the word “tag”, you need to use(priority:: 1)
in the middle of the string instead of[priority:: 1]
). -
If at the end of the query (after
FLATTEN file.tasks AS Tasks
) you addWHERE Tasks.keyword = "pride"
it works.
- What do you do with the date format in dataview settings?