i want to get all tasks with a tag or a specific symbol on the checkbox, so a [n] for notes or [b] for bookmarks that i will be using to track my feelings
[! destaques] Dias Marcantes!
TASK
FROM ""
WHERE icontains(text, "#registro/destaque")
AND file.day >= this.file.day - dur(7 days)
AND file.day <= this.file.day
GROUP BY file.name as filename
i tried this query and it doesn’t work for reasons i don’t understand, it should work, the problem seems to be on the way it detects what a week is but i don’t know at this point, i already changed the data property to date so it can read it
it doesn’t show any errors too, it just say that no results were found
The code below works in a local test vault. Does it work in your vault?
```dataview
TASK
FROM ""
AND #registro/destaque
WHERE
file.day > this.file.day - dur(7 days)
WHERE
file.day <= this.file.day
GROUP BY file.name as filename
```
The query looks like it should work, so it’s a matter of discovering what’s wrong with your data set or setup somehow.
So for starters I would try doing:
```dataview
TABLE file.day, this.file.day, length(file.tasks) as "Task count"
FROM #registro/destaque
WHERE file.day > date(today) - dur(10 days)
LIMIT 15
```
If this lists some files, and indeed lists a date for this.file.day, and that these files actually do have tasks as indicated by the task count, I don’t really see why this query shouldn’t return tasks:
```dataview
TASK
FROM #registro/destaque
WHERE (file.day >= this.file.day - dur(7 days))
AND (file.day <= this.file.day)
GROUP BY file.name as filename
```
If on the other hand, the first query doesn’t return anything you need to pick it even further apart to see which of the criteria fails. Is the tag incorrect? Are there no tasks present? Are the tasks hidden somehow in code blocks, or within html, or something like that?
In this case, please show us a file with some tasks which you expect to show, and also report back on the file name of the file where the query is located, if that isn’t a daily note (and as such might have a different name format).
this is the dataview table and query you sended, it does show some tasks on the table but it doesn’t show on the task query
[n] Nota Teste #registro/nota
#registro/destaque conversa com bibi e principalmente lulu
nota teste 2 #registro/nota
#registro/diário/avaliação
these are the tasks i think it is showing, they are mostly for testing, nothing seems to have 4 tasks with the tag however, and no, i don’t really want to put these outside of the daily notes
oh its, the note that has the tag, and not the task that has the tag, this makes sense, thank you, and i am replying again because i am not sure the other text was a reply
This is what I see with the task query. Not working in your vault, or not what you wanted?
- [ ] Nota Teste #registro/nota
- [ ] #registro/destaque conversa com bibi e principalmente lulu
- [ ] nota teste 2 #registro/nota
- [ ] #registro/diário/avaliação
- [ ] #registro/destaque do this task
## ==Query==
```dataview
TASK
FROM ""
WHERE icontains(text, "#registro/destaque")
WHERE
file.day > this.file.day - dur(7 days)
WHERE
file.day <= this.file.day
GROUP BY file.name as filename
```
it is working, but i put the week date as the start of the week and so its getting things from the last week, i just noticed this because i opened the new week note and it was there, i am not sure if i will keep it that way, but thanks everyone for their help
and also, i wanted to use task querys for other stuff than just things i have to do, so the task with a pin would be a note and the task with a book mark would be my feelings, like a bullet journal and the querys themselves would be on a daily note, so it only shows stuff from that week
either way thanks, i will see if i can fix the could now