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
secret A write-only value checked by the host, and never read by a page. 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 read gives at most. A table read as a list (:for over it, .length, map) takes at most this many, so narrow and paginate before iterating.

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

Comparison What it means
== Equal to this value.
!= Anything but this value.
< Before this value, in the order its own type sorts in.
<= This value or before it.
> After this value.
>= This value or after it.
includes On a text, has this text somewhere inside it, ignoring case. On a list, holds this value, and on a references field this row.
startsWith Begins with this text, ignoring case.

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