Skip to main content

Value Types

Value types are the fields of a class. Each value type defines a named field with a data type and optional constraints.

Definition

{
"name": "lastName",
"dataType": "TEXT",
"required": true
}
PropertyTypeDefaultDescription
namestringField name (camelCase). Must be unique within the class.
dataTypeValueDataTypeTEXTThe type of value this field stores.
requiredbooleanfalseIf true, the field must have a value.
multiplebooleanfalseIf true, the field stores a list of values.
enabledbooleantrueIf false, the field exists in the model but is hidden from the UI.
hiddenbooleanfalseIf true, the field is stored but never shown in the UI.
uniquebooleanfalseIf true, no two objects of this class can have the same value for this field.
listTypeFQNFor LIST data type: reference to a StandardList definition. See Lists.
defaultValueanyFallback default for auto-generated forms. Applied server-side on create when no value is provided. Values that cannot be parsed for the field's data type are silently ignored.

Naming constraints

Field names must be unique within the effective class (including all inherited value types). The following names are reserved and cannot be used:

  • name (used by commons.item as the display name field)
  • creationDate, modificationDate (system fields)
  • Any name starting with _

The name field

commons.item defines a required field called name. This is the display name of every object. All classes inherit this field. It is typically overridden by a formula that computes it from other fields.

For example, commons.person computes name as:

{
"valueType": "name",
"template": "{{firstName}} {{lastName}}"
}

Data types

See Value Data Types for the full reference.

Examples

A minimal text field:

{ "name": "jobTitle" }

A required text field:

{ "name": "lastName", "required": true }

An optional date field, disabled by default:

{ "name": "birthdate", "dataType": "DATE", "enabled": false }

An email field:

{ "name": "emailAddress", "dataType": "EMAIL" }

A field that stores a list of values:

{ "name": "tags", "multiple": true }

A field backed by a predefined list:

{ "name": "status", "dataType": "LIST", "list": "my-project.contractStatus" }

A field with a schema-level default (used in auto-generated forms):

{ "name": "hoursPerWeek", "dataType": "NUMBER", "defaultValue": 40 }

Default values

defaultValue on a ValueType is a schema-level fallback applied by the platform when an auto-generated form creates a new object and the field has no value. It is only relevant when no explicit layout exists — forms built with an OBJECT_FORM_DASHBOARD layout should set defaults there instead using FIELD.defaultValue, which takes priority.