Alrighty, here we go. I’m trying to get a daily journal template up and running, referencing upcoming/due, overdue, and undated tasks. Current template includes the following:
## Overdue Tasks
${template.each(
query[[
from t = index.tag "task"
where t.deadline < os.date('%Y-%m-%d')
and not t.done
]],
templates.taskItem
)}
This pulls the correct tasks, but then it writes them into the page, creating a duplicate of the task for the next day’s query. In other words, the query results keep growing with duplicates included on preceding days’ journal pages. I can create a “live widget” query that doesn’t write the tasks in the page permanently, but then I lose routine interaction with the task (can’t figure out how to display or check the task checkbox, for example).
So this isn’t really a query question–my query works fine. It’s about formatting the results. Namely, how do I get the results in a live format that I can interact with and is not baked into the text of the containing page?