Skip to main content
View as Markdown

Structured & Media Fields

Six field types storing a value with more shape than a string or a number: nested data, lists, colours, source code, coordinates, and scannable codes. All share the base field properties.

Type Stores
json Structured JSON data.
array A list of values.
color A hex colour value.
code Source code with syntax highlighting.
geolocation Latitude/longitude coordinates.
barcode A barcode value (media category).

For the derived and interactive types — formula, count, autonumber, button — see Computed & Action Fields.

json

Stores structured JSON data.

Property Description
schema Optional object, accepted and kept.
app.yaml
- { id: 5, name: metadata, type: json, required: false }

array

Stores a list of values.

Property Description
itemType Element type of the list. Must name a supported type (see below).
maxItems Maximum number of elements (integer ≥ 1).
app.yaml
- { id: 6, name: tags, type: array, itemType: string, maxItems: 10 }

Both properties are enforced. itemType is not free text: it is checked against the list below when the config is validated, and an unrecognised spelling is reported by name as a config error. Omitting it stores an untyped list of text.

The accepted spellings, and the PostgreSQL element type each one selects:

itemType Element type
text, string, varchar TEXT
integer, int INTEGER
bigint BIGINT
smallint SMALLINT
decimal, numeric, number DECIMAL
float, double DOUBLE PRECISION
real REAL
boolean, bool BOOLEAN
date DATE
datetime, timestamp TIMESTAMPTZ
time TIME
uuid UUID
json, jsonb JSONB

Several spellings are aliases for a single type — string and text both select TEXT, so either is correct and the two cannot behave differently. On SQLite an array is stored as JSON text whatever the element type.

color

Stores a colour in hexadecimal format, rendered with a colour picker.

Property Description
default Default colour as a 6-digit hex value with a leading #.
app.yaml
- { id: 7, name: brand_color, type: color, required: true, default: '#3B82F6' }

This is the one field on this page with a real format check: default must match # followed by exactly six hex digits. Three-digit shorthand (#3BF) and named colours (red) are rejected at config decode.

code

Stores source code as plain text, edited with syntax highlighting (CodeMirror 6).

Property Description
language Required. Language for highlighting (e.g. javascript, typescript, yaml, json, python, sql).
lineNumbers Boolean. Show line numbers.
minLines Minimum visible lines (integer ≥ 1).
maxLines Maximum visible lines before scrolling (integer ≥ 1).
tabSize Tab size in spaces. Integer from 1 to 8.
app.yaml
- { id: 8, name: snippet, type: code, language: typescript, lineNumbers: true, tabSize: 2 }

language is required but unconstrained — the listed values are the ones with highlighting support, and an unknown or empty string still passes validation. tabSize has no schema default; the editor falls back to 2 when the field omits it. To render the editor display-only, set readOnly on the form field rather than on the column — read-only is a property of a particular form, not of the stored value.

geolocation

Stores geographic coordinates (latitude and longitude) for location-based features. It takes no type-specific properties beyond the base field properties.

app.yaml
- { id: 9, name: office_location, type: geolocation, required: true }

barcode

Stores a barcode value for product identification and inventory. It belongs to the media category alongside the attachment fields, and is documented here with the other specialised value fields.

Property Description
format Barcode format (e.g. EAN-13, CODE128).
app.yaml
- { id: 10, name: product_barcode, type: barcode, required: true, format: EAN-13 }

format is an unconstrained string: it records which symbology the value uses, and nothing checks the value against it.

Last updated September 1, 2026

This documentation was written with AI, so errors or outdated content are possible. Sovrium is in beta. Contributions and corrections are welcome.

Built with Sovrium