Vocabularies
A display rule says a column’s stored values in words, colors them and marks them; the stored value is still what sorts, filters, exports and is written.
resources: { work_order: { display: { status: { values: { SCHEDULED: 'Booked' }, humanize: true, // ON_HOLD reads "On hold" tone: { DONE: 'good', ON_HOLD: 'warn', '*': 'neutral' }, icons: { ON_HOLD: 'hourglass' }, }, }, },},| Key | Says |
|---|---|
values |
Stored value → its word, up to 80 characters. |
humanize: true |
Every value values does not name, said as words: IN_REVIEW → “In review”. |
tone |
Stored value → good, warn, bad, info or neutral; "*" for every other value. Numbers take thresholds (">= 90"). |
icons |
Stored value → an App icon before the word. Not on a figure. |
tone and icons stay keyed by the stored value, whatever values says.
Masked values
Section titled “Masked values”format: 'masked' draws •••••• for every value, and
masked: { prefix: 'ENC:' } only for values starting with the prefix
(ENC:••••••), in grids, fields, cards and the record’s name (a record
named by a column masked whole is named by its noun and key). It is
presentation, not protection: the value still reaches the browser, and a
reader’s tools can see it. To keep a column out, use hidden
(secrets). Without a rule, a long unbroken token (base64,
hex) is said by its start, the rest a click away.
Where a column’s vocabulary comes from
Section titled “Where a column’s vocabulary comes from”The catalog reads a column’s allowed values from the database: a PostgreSQL
enum type or a CHECK (status IN (…)), a SQLite CHECK … IN (…), a MySQL
enum(…). Those values feed filter choices, board lanes and form pickers.
Without values or humanize, an App says a lowercase value as words
(in_review, in progress, no-show → “In review”, “In progress”,
“No-show”) where it wears a tone or an icon, heads a group, or is one of the
column’s allowed values; an UPPER_SNAKE value or a code stays as stored.
Where the words appear
Section titled “Where the words appear”A rule’s words are used in grid cells, record fields, cards, a group’s
heading, breakdowns on dashboards and pages, and the filter rail’s choices.
A tab’s name is its own label, and a workflow strip’s step labels are its
steps’ (workflow('status', [{ value: 'DONE', label: 'Done' }])).
More display options (money, percent, bars, avatars, value renderers): Lists, pages & forms.