How to use dataview to display a table (list) of projects indicating the number of unfinished tasks?

Things I have tried

Advise, please: there are notes with projects, in each list of tasks. How to use dataview to display a table (list) of projects indicating the number of unfinished tasks?

Thanks

What I’m trying to do

Something like this:

table prop
where file.name = "Dataview Test page"

prop::$= let value = dv.page("Dataview Test page").file.tasks.where(t=>!t.completed).length; dv.paragraph(value)

Thanks! :slight_smile:

I could not get. I don’t know dataviewjs at all. Did something wrong…



:frowning:

The inline code needs to be in single code marks :grin:

I don’t understand…
works this:

dataview table prop where file.name = "Dataview Test page"

and this:

dataviewjs let value = dv.page("Dataview Test page").file.tasks.where(t=>!t.completed).length; dv.paragraph(value)

but it doesn’t work:

prop::```$= let value = dv.page(“Dataview Test page”).file.tasks.where(t=>!t.completed).length; dv.paragraph(value)

:(

ah inline is just the one tick

Ok!:

  • $=dv.page("Dataview Test page").file.tasks.where(t=>!t.completed).length; dv.paragraph(value)

Dataview (for inline JS query ‘dv.page(“Dataview Test page”).file.tasks.where(t=>!t.completed).length; dv.paragraph(value)’): ReferenceError: value is not defined

I found my mistake. Thank you very much for your help and time! :slight_smile:

1 Like

happy to help :grin:
There is an example vault that you can download which might be useful.

s-blu/obsidian_dataview_example_vault: A example vault to collect and showcase various dataview queries. Created on behalf of AB1908 (github.com)

1 Like

Thanks! :slight_smile:

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.