What Iβm trying to do
I am currently just finding tasks that starts with
and is contained in daily notes.
this code works for the most part, but it breaks if a file in Daily has a name that has both digits and letters
dv.taskList(dv
.pages()
.where(p => p.file.folder.includes("Daily"))
.sort((page) => page.file.name, "desc")
.file.tasks
.where(t => t.text.includes("π"))
.groupBy(g => dv.page(g.link.path).file.link )
.sort(s => dv.page(s.key).file.name, "desc")
, false
)
Evaluation Error: TypeError: Cannot read properties of undefined (reading 'file')
at eval (eval at <anonymous> (plugin:dataview), <anonymous>:7:36)
at eval (plugin:dataview:8103:24)
at Array.sort (<anonymous>)
at Proxy.sort (plugin:dataview:8102:14)
at Proxy.groupBy (plugin:dataview:8126:33)
at eval (eval at <anonymous> (plugin:dataview), <anonymous>:7:3)
at DataviewInlineApi.eval (plugin:dataview:18404:16)
at evalInContext (plugin:dataview:18405:7)
at asyncEvalInContext (plugin:dataview:18415:32)
at DataviewJSRenderer.render (plugin:dataview:18436:19)
Things I have tried
I have tested out different ways of checking if the file is of the correct type from from rejecting templating patterns β{{date}}β to .mach()
with regex to now p.file.folder.includes("Daily"))
I have also experimented with .groupBy()
and .sort()
.
donβt know if the problem is with the code mentioned above or dataview.