Dataview task and project examples

Thank you @armint, for typing out your workflow here. I’m currently trying to do something similar, and I have a question for you.

If I understand your setup correctly, you have a note for each project, which contains the Dataview query to get the task notes associated with that project. What I don’t get is the “Projects” overview page. In your code example, you query length(tasks) as Total, for example. If I try to reconstruct this, the tasks variable is empty. I assume that is because the project page does not actually have tasks written in the note, but uses Dataview queries to get them from other pages.

Any help with this?

1 Like

Hello @armint,

I’m facing the same issue as @Joern. Is you clever workflow still working with latest Dataview (0.4.5)?

Thanks and regards

For anyone if they stuck at length() function not working to get the progress show, I stuck the same question like you, and use the group by syntax to get the similar result, hope it can helps you.

table length(rows) as total, sum(rows.completed) as completed, sum(rows.completed) / length(rows) * 100 + "%" as Progress, rows[0].file.link as Next
from #tasks
sort file.mtime asc
group by project

if anyone know the answer why my length() is not working (seems like I am not only one meet this problem), please let me know.

Fabulous resources @arminta!
Quick question here: Under available tasks and completed tasks, I keep getting this error.

Any guidance on how to fix this? Thanks!

Dataview: Every row during final data extraction failed with an error; first 3:

            - Operator '/' is not supported for 'null' and 'number
- Operator '/' is not supported for 'null' and 'number

The only way I got the Projects dv to populate with
@arminta’s code above was by adding more than 1 task as a [[]] on the individual project template in the tasks:: field

I too am getting a similar error in Dataview, it just started happening in the last 24hours:

Dataview: Every row during operation 'where' failed with an error; first 3:

            - Operator '+' is not supported for 'null' and 'number

If you find a solution @Keys , I’d appreciate a ping.

@blacksmithgu or @Moonbase59 have you any ideas what is going on here? (I pinged Matthias as, in my case it is your ‘upcoming birthday’ script that is no longer working for me).

1 Like

No luck on my end. Couldn’t find a fix anywhere. Looking forward to seeing if you find out anything

do you need to write a time value - e.g. recur length:: 7 days

Besides all the useful information in this thread: @arminta , may I ask which theme you are using in your first post? Looks very refined and focused.

This is such a great example.

I’m keen to hear if/how anyone has implemented task scheduling into #mermaid gantt chart OR into the Daily Planner / #daily-note
This would aid in bringing it visually to life.

2 Likes

Hey @arminta,

Sorry, I’m kind of newish to Obsidian plugins.
For the above snippet, where do I add it so that the button shows?

You need to install a community plugin called “Buttons!”

Great inspiration! And for your contribution, I’m sending all positive energy and wishes that back in April “Create $3M” manifested :wink:

Following up on this reply:

Once you’ve added the “Buttons!” community plugin, you make a codeblock beginning with ```button

then paste the code

and end with ```

Hi @arminta , thanks for these examples. I don’t know if you’re still using the same system, and would be curious to learn if you are or how you’ve changed it. In the meantime, I have two questions:

  1. Following up on the same questions here, here, and here— the use of length(tasks) as Total in the dataview for the Projects page. What is tasks supposed to be being populated from?

  2. You have a Tasks:: metadata in your Project template. Do you manually add links to whatever tasks are part of that project? If so, that would mean that you have to both add the Project:: metadata to a new task, then go to the relevant project and add the new task to the Tasks:: metadata, correct?

I’m also very curious to know how length(tasks) is populated.

  • are all tasks individual pages?
1 Like

Looks awesome, is there a demo vault of this available?

2 Likes

Sorry if this is too simple.

Is there any way to indicate that the task or project to be added to a certain table?
Thanks

@arminta How do you update due dates for recurring tasks? I see the Next Date field, but how do you update the Due Date once a given instance of a task is completed?

Hello! Did anyone ever figure out exactly how the length(tasks) was populated?