Skip to content

Reusable Queries? #1982

Answered by ReidWeb
ReidWeb asked this question in Q&A
May 29, 2023 · 2 comments · 2 replies
Discussion options

You must be logged in to vote

Following through on @claremacrae's suggestion

A file /scripts/tasks_daily_log_scheduled.js

with content

const query = `
not done
scheduled = ${dv.current().file.path}
group by heading
hide backlink
hide scheduled date # we know what date it is 🤪
`;

dv.paragraph('```tasks\n' + query + '\n```');

I then import this JS in each of my daily notes as I did before

```dataviewjs
dv.view("/scripts/tasks_daily_log_scheduled");
```

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@claremacrae
Comment options

Comment options

You must be logged in to vote
1 reply
@claremacrae
Comment options

Answer selected by ReidWeb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants