-
-
Notifications
You must be signed in to change notification settings - Fork 391
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: Tasks should be filterable on the completed state #46
Comments
This has been on my TODO list forever since it's conceptually simple, my task query implementation is just a hack. Will improve. |
This would be awesome. Is there a workaround in the meantime? |
This would be a great addition! Hope to see it implemented soon. |
I have good news and bad news. The good news is this is now possible; the bad news is you need to write a tiny bit of javascript for it:
|
cool, how can I search in every note in my vault? |
With "". dv.pages works like sources in dataview. You need to quote it though - so
|
Thank you! |
Is it possible to sort the tasks based on file name? |
You mean for tasks that are appearing in a file? Like give me all from "Project X"?
You just need to 'cast' it as a dataview array. |
Thanks for the prompt reply! @danielhauck Sorry for not being clear about what I am trying to achieve. Now I will elaborate it as follows. First, I may query all tasks from files within a folder with something like:
This lists all uncompleted tasks from files within the folder I tried the following options (without knowing if the syntax is correct or not :-(, however), but neither of them worked for me.
Of course, it would be great if the tasks from individual files/notes can also be somehow sorted, e.g., based on task description. I also tried your code, and it gives the following error message:
|
Ah, this is a short-coming of the |
That's great news! Looking forward to that! @blacksmithgu This feature request can be found in the following issue: |
Is there a way that instead of telling it to look at a file with dv.pages I can have it look at all the files in a folder? |
You still use dv.pages, just providing the path to the folder: |
Ah, I was just using dv.pages("x/y/z") instead of dv.pages('"x/y/z"'). |
Yay, tasks can now be filtered on completed!
You can also do a fair bit other stuff with them, like using the |
Thanks for @sheeley for implementing this functionality. |
The task list and table depend upon different implementations internally. I could see this being interesting. @blacksmithgu think there should be a task table? |
@blongty @sheeley The correct move here is to (1) allow FROM statements to select tasks instead of files, and (2) implement task renderering support so that they work automatically in both list views and table views. This is something @sheeley can look into in the short-medium term if he has time / interest. |
@blacksmithgu happy to. Thoughts on the syntax?
And for the functionality, would you expect a single task per row? Or would it be possible to render a task per cell? I could see value in the latter. |
For the syntax, I'm thinking I think the default would be one task per row, allowing "task lists" via a |
this also worked for me:
|
task where !completed works as well |
A common scenario (if not the most common) when gathering tasks using dataview is likely to be able to pull all tasks that remain incomplete. It would be ideal to be able to do something like the following to filter out tasks that aren't complete:
The text was updated successfully, but these errors were encountered: