DVJS - Interactive Tables
Setup
This is a DataviewJS query, utilizing the Metadata Menu Plugin and Templater to create a table with results that can be edited directly, i.e., without having to open the respective note.
Code
Don't forget to start and end the code block with three backticks.
dataviewjs
const {fieldModifier: f} =
this.app.plugins.plugins["metadata-menu"].api;
dv.table(['Date', '๐ถ', '๐๏ธโโ๏ธ', '๐ด', '๐ด', '๐งโ๐คโ๐ง', 'PU', 'CR', '๐๏ธ'],
dv.pages('')
.where(p => p.file.path.includes('06 ๐ BJ/10 Daily'))
// .where(p => p.tags && p.tags.includes('BJ/Daily'))
// .filter(p => !p.file.path.includes('90 Organize'))
// .filter(p => !p.file.path.includes('99 ๐งช The Lab'))
.filter(p => p.Week && p.Week == '2023-W52')
.sort(p => p.file.name)
.map(p => [
p.file.link,
f(dv, p, "Walk"),
f(dv, p, "Workout"),
f(dv, p, "Challenge1"),
f(dv, p, "Sleep"),
f(dv, p, "REL"),
f(dv, p, "Challenge2"),
f(dv, p, "Challenge3"),
f(dv, p, "Note")
])
)