ShtukbaseStandard
page/base/fields.md

Kinds of fields

Which fields the records of a collection can have: the kind of field, what it holds, how it is described in the schema and what is checked.

Page fields (1)
icon🏷️

A record field is described in the collection schema, in properties: of its page: the field name, its kind (kind), the label (label) and the parameters of the kind. Any field can have required: true (always filled) and requiredWhen: {field: [values]} (filled when another field, usually the state, takes one of the values).

KindWhat is in the fieldParameters in the schemaWhat is checked
textfree textnoneonly requiredness
selectone value from a listoptions: [{name, label, color}]; multiple: true for several valuesthe value is among options (SCH-R02)
relationthe path of a record of another collection, for example /work/initiatives/i-01collection: where it points; multiple: true for several pathsthe record exists and lies in this collection (SCH-R01)
phasethe state of a record: the name of a contour phasecontour: the path of the contourpackage contours: the value is a phase of this contour
datea datenonethe form YYYY-MM-DD (SCH-R02)
numbera numbernonea number (SCH-R02)
checkboxa checkboxnonetrue or false (SCH-R02)
rollupa rollup: the number of records of another collection that refer to this onefrom: the collection, via: the relation field in it, measure: countcomputed, not written by hand
urlan address in the outside worldnoneonly requiredness
filesattached filesnoneonly requiredness

A relation is written in the lower record and points up; each relation has one stored direction. Back links are computed (a rollup) and are not created by hand. A link in the text of a page does not count as a relation.

An empty value (no field, an empty string, an empty list) is skipped by the value check: emptiness is caught only by requiredness (SCH-R03).

The package Collections puts this page at /base/fields.md.Source text