Can anyone understand how this dataview query works fine but then stops working when wrapped into a template?
I am just trying to find pages WHERE their ‘date’ is bigger than the ‘date’ of the current file [].date and then pick the first one in the ascending order.
Using this query I get the link to the note that happened right after this one. And yes render the link in markdown (I am open to ideas if you have a better way).
LIST WHERE (date > [].date) SORT date ASC LIMIT 1
const dv = app.plugins.plugins[“dataview”].api;
const te = await dv.queryMarkdown(“LIST WHERE (date > [].date) SORT date ASC LIMIT 1”);
tR += te.value;