Query blocks
Put a Deckard query in a deckard code fence to keep a live list in a note. Query block in the / menu writes one, and Copy as live query block in a search page’s or the Task Board’s Export copies the current search as one:
```deckard sort=updated limit=10
tag = #project/atlas AND task = open
```
As a table of tasks:
```deckard view=table columns=due,priority,for sort=due
tag = #project/atlas AND is:open
```

- The Markdown preview shows the matches, notes first, then tasks, each linking to its source line.
markdown.preview.openMarkdownLinksdecides where links open. - Tick a task in the preview. Select a task’s box to complete it, or a done task’s box to reopen it, as its box on any page does, with Undo in the message. The first time, VS Code asks whether to let Deckard open the link; choose Open, and tick Do not ask me again for this extension to skip the question next time. A box drawn before Deckard last started, or for a task that has changed since, writes nothing and the preview is drawn again.
- Notes are alphabetical. Tasks are open first, soonest due first, then in source order; done tasks are struck through and overdue dates highlighted.
sort=takestitle,due,scheduled,start,done,priority,for,status,note,created,updated, or a notes table’slinks,tasks,tags, or#namespace, withdir=ascordir=desc. Dates sort newest first by default, everything else ascending; empty values come last.sort=urgencyputs the most urgent tasks first, and leaves the notes in their order.group=lists the tasks under a heading per group, each with its count,Overdue · 3, in the order of the Task board’s columns:due: Needs a new date, Overdue, Today, Tomorrow, Within a week, Later, No due date.scheduledandstarttake the same days, with Earlier or Started before today and No scheduled date or No start date. Done and cancelled tasks are under Done and Cancelled, last.priority: Highest to Lowest, then No priority.status: your statuses in the orderdeckard.tasks.statuseslists them, a group for a character no status names, such as Unknown [!], then Done and Cancelled.note: by note name.tag: each#tag a task has, its own or one it inherits, so a task with two is under both; No tag last.- A namespace, such as
group=#context: its tags by name, then No context, as the board’s Tag… columns are. for: who each task is for, Nobody named last.
Done tasks stay in their group, after its open ones, except under the dates.
sort=orders the tasks within each group, andlimit=cuts the list before it is grouped. Notes are not grouped. Copy as live query block on the Task board writes the board’s grouping asgroup=.limit=10shows at most ten notes and ten tasks; the header still shows full totals.view=tabledraws tasks as a table.columns=due,priority,for,notepicks the columns after the title, from thesort=names plustags,blocked, andid. The default is due date, priority, who it is for, and note.view=tabledraws notes as a table too, above the tasks.noteColumns=picks their columns after the title:note,created,updated,links(how many other notes link to the entry’s note),tasks(1/4 done (25%), steps aside),tags, or a namespace such as#status, which shows the entry’s#status/…tags by name. The default is note, updated, links, and tasks. A cell with nothing to show is left empty.noteColumns=also takes a type’s field, a path, a reverse, or a computed field, headed as you write it:noteColumns=lead,team.lead,open-tasksreads them from the typed row each note is, or else the rows its tags are. A name no type has is warned of, and the rest draw.thisin a block’s query is the note the block is in, soteam = thisin a team’s hub note lists what its people’s notes hold, and the same block works in every team’s note.- Notes sort by any of their columns too, with or without
view=table:sort=links dir=descputs the most linked first, andsort=#statusorders them by status. A note’s#statusand tags include those it inherits from the tagged headings above it and the note’s front matter; an untagged heading is part of the note above it, not a row of its own. A sort by a column only tasks have, such asdue, leaves the notes in their order, and one only notes have leaves the tasks in theirs. - Above the fence in the editor: totals and Open search page. Results refresh when any note changes, not only the one holding the block. Everywhere else, such as on GitHub, the fence stays ordinary fenced code.
- A query that does not parse shows its error. An unknown option shows a warning and the rest runs.
- Tags in a query block are not indexed, but typing
#or@in one still suggests tags.
A project’s open tasks by when they are due, the most important first in each group:
```deckard group=due sort=priority
#project/atlas is:open
```
A table of every project, its status, and how far along its tasks are:
```deckard view=table noteColumns=#status,tasks,updated sort=#status
tag = #project/* AND is:note
```
A project’s decisions, with the fields their front matter holds:
```deckard view=table noteColumns=date,state,decided-by
type = decision AND project = this
```
← Search pages · All topics · Home and Stats →