Skip to main content

Value Data Types

The dataType property of a Value Type determines what kind of value the field stores and how it is displayed and validated.

The default data type is TEXT if dataType is omitted.

Text

TypeDescription
TEXTA single-line text string. Default type.
TEXTBLOCKMulti-line rich text (HTML).
LONGTEXTMulti-line plain text. Large content; not search-indexed.
JSONRaw JSON string. Always system-managed; not user-editable.
SECRETA sensitive value (token, credential, code). Never returned in read responses; excluded from exports.
MULTILINGUALA text value with per-language variants.
EMAILAn email address. Validated on input.
HYPERLINKA named link stored as { name, href }. Displayed as a clickable link.

Choosing a text type

Use caseType
Short, searchable, filterable textTEXT
Rich text with formatting (HTML)TEXTBLOCK
Multi-line plain text, large content, no search index neededLONGTEXT
System-generated structured output (AI, gateways)JSON
Sensitive value that must never be readable after writeSECRET

Storage properties

TypeSQL-indexedES-indexedMongoDBUser-editable
TEXTYesYesYesYes
TEXTBLOCKNoYesYesYes
LONGTEXTNoNoYesYes
JSONNoNoYesNo
SECRETNoNoYesYes (write-only)

LONGTEXT

LONGTEXT stores multi-line plain text without HTML sanitisation. It is stored only in MongoDB, so it is not available for filtering or full-text search. Use it for large content such as markdown, log output, or free-form notes where search indexing is not required.

{ "name": "markdownContent", "dataType": "LONGTEXT" }

Real-world example: commons.intake.markdownContent.

JSON

JSON stores a raw JSON string produced by the platform (AI tasks, gateway responses). It is always system-managed — fromRequestParam() returns null, so the value cannot be set via API request parameters. Use toJson() in scripts to deserialise the value to a JavaScript object or array.

{ "name": "responseJson", "dataType": "JSON" }
caution

A JSON field cannot be set or updated via standard create/update request parameters. Only platform processes (scripts, gateways) can write to it.

SECRET

SECRET stores a sensitive text value — tokens, credentials, invitation codes, or any value that must never be readable via the API or UI. The primary use case is values that are written once (e.g. on object creation) and then consumed exclusively by scripts: the script reads the raw value from dataObject, uses it as a credential or token, and the value is never exposed outside the server.

{ "name": "invitationToken", "dataType": "SECRET" }

Behaviour summary:

  • Stored in MongoDB as plain text.
  • Readable by scripts via dataObject.<fieldName> — the full value is available inside script execution.
  • Omitted from all API read responses — the field is not present in returned objects.
  • Not SQL-indexed and not search-indexed — cannot be used in query filters.
  • Excluded from Excel/CSV exports.
  • Rendered as a masked input in the UI; no reveal affordance.
  • Write behaviour is identical to TEXT; the platform does not enforce write-once semantics — that is the responsibility of the service writing the value.
caution

Because SECRET fields are omitted from read responses, you cannot verify or display the stored value via the API after creation. Design your data model accordingly — for example, store a non-secret reference (a prefix or expiry date) alongside the secret if you need to show something to the user.

HYPERLINK stores a named URL as a structured object — not a plain string. The structure is always { name: string, href: string }, where name is the display label and href is the target URL.

{ "name": "websiteUrl", "dataType": "HYPERLINK" }

Read (API response):

{ "websiteUrl": { "name": "Mosterd Platform", "href": "https://mosterd.com" } }

Submit (create/update request):

{ "websiteUrl": { "name": "Mosterd Platform", "href": "https://mosterd.com" } }

The API always returns the structured form — even if only href was provided on write. Both name and href should be supplied when submitting a value.

Numbers

TypeDescription
INTEGERA whole number.
DECIMALA decimal number.
CURRENCYA monetary amount. Displayed with currency symbol.
PERCENTAGEA percentage value. Displayed with %.

Boolean

TypeDescription
BOOLEANTrue or false. Displayed as a checkbox.

Date and time

TypeDescription
DATEA calendar date (year, month, day).
DATETIMEA date with time of day.
TIMEA time of day without date.

Files

TypeDescription
FILEA file attachment.
IMAGEAn image file. Displayed as a preview.

Lists

TypeDescription
LISTA value from a predefined list. Requires the list property pointing to a StandardList TypeFQN.
ARRAYAn ordered list of values.

Example

{
"valueTypes": [
{ "name": "firstName" },
{ "name": "lastName", "required": true },
{ "name": "emailAddress", "dataType": "EMAIL" },
{ "name": "birthdate", "dataType": "DATE", "enabled": false },
{ "name": "salary", "dataType": "CURRENCY" },
{ "name": "isActive", "dataType": "BOOLEAN" },
{ "name": "status", "dataType": "LIST", "list": "my-project.contractStatus" },
{ "name": "notes", "dataType": "TEXTBLOCK" }
]
}