Skip to content

Field types

What a table’s field may be: the closed set of types a submitted value is checked against, the roles the platform reads a field for, and what a listing may narrow and order rows by. Served over MCP as vizitka://docs/fields, and by describe_vocabulary with topic=fields.

What a field holds, and what a filter may ask of it.

Type What a row holds A filter asks May be filterable May be sortable
text One line of text. ==, !=, <, <=, >, >=, includes, startsWith yes yes
long_text Several lines of text. includes, startsWith yes no
markdown A document, written in Markdown. A page reads it as a text, and draws it with markdown. includes, startsWith yes no
email An email address. ==, !=, <, <=, >, >=, includes, startsWith yes yes
phone A phone number. ==, !=, <, <=, >, >=, includes, startsWith yes yes
url A web address. ==, !=, <, <=, >, >=, includes, startsWith yes yes
number A number. ==, !=, <, <=, >, >= yes yes
date A calendar date. A host answers it as the text YYYY-MM-DD, and a page reads it as a date. ==, !=, <, <=, >, >= yes yes
datetime A day and a time of that day, in UTC, to the millisecond. A host answers it as the text YYYY-MM-DDTHH:MM:SS.mmmZ, and a page reads it as a time. ==, !=, <, <=, >, >= yes yes
boolean true or false. ==, !=, and a field of it stands alone as p.field or !p.field yes no
choice One of the field’s options. ==, !=, <, <=, >, >=, includes, startsWith yes yes
choice with multiple: true A list of the field’s options. includes yes no
reference One row of another table. A page reads the field as that row. ==, != yes no
references Several rows of another table. A page reads the field as the list of those rows. includes yes no
picture One picture among the site’s files. nothing no no

What the platform itself reads a field for, said on the field with role. One field per role, and a table that names none for a role falls back to the field literally called that.

Role What reads it Played by
title What the row is called: the title of its own page and of a shared link, its name wherever rows are listed, and what its address is made from when it is given none. text, long_text, markdown, email, phone, url, number, date, datetime, boolean, choice
body What the row says. text, long_text, markdown, email, phone, url, number, date, datetime, boolean, choice
language Which language the row is written in. text, long_text, markdown, email, phone, url, number, date, datetime, boolean, choice
summary What the row is about in a sentence or two: the description its own page gives a search engine or a shared link. text, long_text, markdown, email, phone, url, number, date, datetime, boolean, choice
cover The row’s picture: what a shared link of its own page shows. picture

500 rows at most in one read. How many rows one load may read. A bare :for over tables.posts walks at most this many, newest first, and so does one page of a listing asked to be bigger than it. paginate is how a page reaches the rest, because a page is read in the query and every row a table holds is on one.

What a filter may compare a value with. Which of them a field answers to is its own type’s.

Comparison What it means
is Equal to this value.
is_not Anything but this value, and a row that never carried the field counts.
from This value or after it, in the order its own type sorts in.
until Before this value and not equal to it, so two ranges meet without overlapping.
ilike Has this text somewhere inside it, ignoring case.
starts_with Begins with this text, ignoring case.
includes Holds this value among the several it lists. Only on a field marked multiple, and on a references field, which is asked about a row.

Which way an order reads a listing. A field can be ordered on when its own definition marks it sortable, which is a separate question from filterable.

Direction What it means
asc Smallest first: A before Z, the oldest date, the cheapest price.
desc Largest first: Z before A, the newest date, the dearest price.

::image[Alt text]{key=<key>}, on a line of its own, with any of these pairs after the key. Keys in the order the editor writes them, each with the values it accepts. Absent is the default: a picture on its own line, at the full width of the article.

Key Values
align left, center, right
size small, medium, large