Skip to content

Showcase basic syntax of LIST queries

Basic List Queries

Basic

List pages from a folder

LIST
FROM "10 Example Data/games"

List pages from a tag

LIST
FROM #type/books 

Combine multiple tags

LIST
FROM #dvjs/el OR #dv/min 

Combine multiple folders

LIST
FROM "10 Example Data/books" OR "10 Example Data/games"

Combine tags and folders

LIST
FROM "10 Example Data/games" AND #genre/action  

List all pages

Add dataview to code block

The output of this is pretty long. If you want to see it, add dataview to the code block - like on the examples above!
Please note: There needs to be a space behind LIST to see results!

LIST 

Variants

List pages from a certain author

LIST
FROM #type/books 
WHERE author = "Conrad C"

List pages and show a meta data field

Only one additional information

For lists, you can only add one additional output. For more, you need to use a table or create a custom output.

LIST author
FROM #type/books

List meta data values instead of the pages

i.e. list source links of your recipes:

LIST WITHOUT ID source
FROM "10 Example Data/food"
WHERE source

Group list elements

What is#^new-id-after-grouping

LIST rows.file.link
FROM "10 Example Data/books"
GROUP BY author

Sort list elements

LIST author
FROM "10 Example Data/books"
SORT author

Advanced usage

Do you want to see more advanced examples? Head over to the Query Type Overview to see all available LIST queries in the vault!