Notes Web supports server-side rendering of Obsidian-style Dataview queries in
fenced dataview code blocks.
TABLE— render columns from frontmatter or computed expressions.LIST— render matching notes as a list.TASK— render task lists from matching notes.CALENDAR— group matching notes by a date expression.
Supported clauses are FROM, WHERE, SORT, LIMIT, GROUP BY, and
FLATTEN. FILTER is supported for TABLE only.
Basic table query:
TABLE status, file.name AS "Name", file.folder AS "Folder"
FROM "Projects"
SORT file.name
Use link(file.path, title) when you want a clickable note link whose visible
text comes from frontmatter instead of the file name:
TABLE link(file.path, title) AS "Name", status
FROM "Projects"
SORT file.name
Add interactive column dropdown filters to any TABLE query:
FILTER <field> [DEFAULT <value-or-list>] [MODE single|multi] [CLEARABLE]
<field>— a visible column source field (e.g.,status,tags,file.name). Dots are allowed for nested fields likefile.tags.DEFAULT— initial value(s) selected on page load. Optional.- Single mode: exactly one scalar value. List syntax (
[a, b]) is an error. - Multi mode: a list wrapped in brackets (
[a, b]). A scalar default is an error. - Values with spaces must be quoted.
- Single mode: exactly one scalar value. List syntax (
MODE—single(native<select>, default) ormulti(checkbox dropdown). Case-insensitive.CLEARABLE— exposes anAlloption that clears the filter. WithoutCLEARABLEand without aDEFAULT, a disabled placeholder is shown.
Multiple filters combine with AND. Multi-mode values combine with OR within the
same field. Filters apply server-side, before LIMIT.
TABLE status, file.name AS "Name"
FROM "Projects"
SORT file.name
FILTER status DEFAULT "active" CLEARABLE
FILTER priority MODE single
TABLE tags, file.name AS "Name"
FROM "Projects"
SORT file.name
FILTER tags MODE multi
Fields named tags, file.tags, and file.etags automatically display values
with a leading # prefix. For example, a frontmatter value project appears
as #project in the filter dropdown.
Defaults and AJAX parameters for tag fields must also use the # prefix.
Each Dataview table includes a Filter table… search input. It filters rows by
case-insensitive text containment. The text filter combines with dropdown
filters using AND. When you type, a 200 ms debounce prevents excessive requests.
Click any column header whose source is a simple field path to sort by that column:
- First click: descending.
- Subsequent clicks: toggle descending ↔ ascending.
aria-sorton the active header reflects the current direction.- Complex expression columns (e.g.,
dateformat(...)) are not sortable.
The Rows dropdown controls how many rows appear per page. Pagination is
client-side and resets to page 1 whenever you change a filter, text query, or
sort. The Rows value is preserved across AJAX updates.
When no rows match the current filter combination, the table header remains
visible and a No matching rows message is shown below it.
All filter, sort, and text interactions are performed via AJAX. The server returns a partial HTML fragment. For debugging or direct access, the same URL format works in the browser:
/Projects/Index.md?action=renderDataviewTable&table=1&filter.status=done
Parameters:
| Parameter | Required | Description |
|---|---|---|
action |
yes | Must be renderDataviewTable. |
table |
yes | 1-based table index in document order. |
filter.<field> |
no | Filter value for the given field. Repeat for multi. |
q |
no | Text search query (case-insensitive contains). |
sort |
no | Field to sort by (requires dir). |
dir |
no | Sort direction: asc or desc (requires sort). |
Omitted filter params mean "All" (no filter active). The response is the full
.dataview-table-wrap HTML fragment including controls, table, and pager.
If the request is invalid (wrong method, unknown action, missing table,
undeclared filter, invalid sort/dir), the response is an HTML error fragment
with class dataview-error and an appropriate HTTP status code.
TABLE status, tags, file.link AS "Name"
FROM "Projects"
SORT file.name
FILTER status DEFAULT "active" CLEARABLE
FILTER tags MODE multi
This renders a project table with:
- A single-select
statusdropdown defaulting toactivewith anAlloption. - A multi-select
tagsdropdown with checkboxes and#-prefixed values. - Server-side text search via
Filter table…. - Clickable column headers for server-side sorting.
- Client-side pagination via the
Rowsdropdown.
Calendar queries render matching notes grouped by day. When no expression is
provided, file.mtime is used.
CALENDAR file.mtime
FROM "Syntax"
The date expression may be a built-in date field such as file.mtime or
file.ctime, a frontmatter date field, or a date(...) expression. Values that
cannot be parsed as dates are skipped. If no rows contain a date, the calendar
renders a visible Aucune date. message.
CALENDAR does not render interactive table controls. FILTER in a CALENDAR
query is unsupported and produces a visible Dataview error.
LIST and TASK queries render without interactive controls. They display matching
notes and tasks as formatted lists. FILTER is not supported in non-TABLE
queries and produces a visible Dataview error.