Things I have tried
Block is in daily note template. Result displays all #task files without WHERE line in query; displays no results for table query when including WHERE line as shown:
const {update} = this.app.plugins.plugins["metaedit"].api
const {createButton} = app.plugins.plugins["buttons"]
dv.table(["Begin", "End", "Event", "Description", ""], dv.pages("#task")
.sort(t => t.tbegin, 'asc')
.where(t => t.taskdate == dv.current().file.name)
.map(t => [t.tbegin, t.tend, t.file.link, t.description,
createButton({app, el: this.container, args: {name: "Done"}, clickOverride: {click: update, params: ['status', 'done', t.file.path]}})])
)
There is sample task file with proper metadata
What I’m trying to do
I trying have a simple table displaying task files (I don’t use tick boxes) in table view on my daily note. Each task file has inline taskdate:: YYYY-MM-DD format. Each daily note is named simply YYYY-MM-DD according to the current day.
Syntax work perfectly with other templates to call documents based on current file name, example:
dv.table(["Title", "Published", "Pages"], dv.pages()
.sort(t => t.year, 'asc')
.where(t => t.author == dv.current().file.name)
.map(t => [t.file.link, t.year, t.pages]))
What wrong with using .where(t => t.taskdate == dv.current().file.name)
for tasks above? Something with date instead of string? Solution in dataviewjs, I like button complete feature instead of box