Skip to content

Fields and schema

The Schema tab of an entity definition defines the stored fields of a record type. In the Constructor, open Entity Explorer, select an entity definition, and choose Schema in the Data model group.

Fields live on the entity’s primary table or inside nested Table fields (child rows). Every field has a key, a display name, a field type, and rules that control when it is required, visible, and editable.

These are the field types the Constructor offers, using the same names you see in the field editor:

Field typeWhat it stores
Yes/NoA true/false value.
DateA calendar date without a time component.
TimeA time of day without a date.
Date and timeOne exact moment. It is displayed and edited in the workspace time zone as one minute-precision field; users do not edit an offset.
UserA link to a workspace user. This is people-valued data; it does not grant access by itself.
RoleA link to a workspace role.
Whole numberAn integer value. Can carry the Line number semantic role (see below).
DecimalA number with configured precision (1–28) and scale. Precision and scale are required settings.
FileA governed workspace file reference. File access is checked when the file is attached; storage goes through Moltaro file services.
AddressA structured postal address (full address, street lines, locality, region, postal code, country) with optional coordinates. A field setting can require coordinates. Address fields feed location and map behavior.
SelectOne value from an admin-defined option list with stable option keys and display labels. The Allow multiple setting turns it into a multi-select that stores several option keys.
ClassifierOne category from a bound hierarchical Classifier Catalog. It is available on the primary table, stores one category, and displays the category’s current breadcrumb.
StringSingle-line text with a maximum length (default 512, up to 4096).
TextLong multi-line text without a length cap.
TableRepeatable child rows with their own columns. Rows belong to the owning record and have no independent identity, access, or detail page.
MoneyAn amount plus an ISO currency code. A base currency is a required setting.
ReferenceA link to a record of another entity definition. See Relationships and containment for reference settings.
Inverse referenceThe reverse of a Reference: the records whose paired Reference field points at this record. It stores no value of its own and cannot be required. Writing it as a list of record ids rewrites the paired Reference on each affected source record.

Two facts worth knowing when you model data:

  • Use Date for a calendar fact and Time for a time-of-day fact. Use Date and time only when the value must identify one exact moment. The latter stores one UTC instant and does not preserve the sender’s original offset or a named time zone.
  • Changing a field’s type deletes the data already stored in that field. The Constructor warns before this happens, and the action cannot be undone.

A configurator can give a String or Text field the Markdown semantic role. The field still stores Markdown source, but Moltaro presents it according to the screen:

  • record details and preview drawers show formatted headings, lists, task lists, tables, quotes, emphasis, links, and code;
  • the field label includes a Full screen action when a saved value is not empty, opening the same formatted content in a full-screen reader;
  • lists, history, child tables, and Board cards show a compact plain-text excerpt instead of Markdown punctuation or link destinations;
  • create and edit forms use a Markdown editor with Source, Preview, and desktop Split modes, formatting actions, undo/redo, and a field-level full-screen editor. The full-screen editor changes the same draft and does not save or cancel the outer form;
  • record, Association-create, Board-target, and Board Data forms can add governed PNG, JPEG, and WebP images by upload, clipboard paste, drag and drop, or selection from the File System. The image is attached to its exact record or Board Data owner only when the outer form saves successfully.

On a small screen, use Source or Preview; Split is intentionally hidden. Closing a full-screen reader or editor returns focus to the button that opened it. The editor preserves whitespace, line endings, and Markdown punctuation in the value you submit.

Moltaro supports a fixed safe Markdown subset. Raw HTML, scripts, iframes, remote images, data:/blob:/file: images, SVG, raw file endpoints, and executable URL schemes are not rendered or fetched. Inline images are inspected before display; pending, quarantined, rejected, missing, or unauthorized content shows no file body. External web links open separately. Oversized or excessively complex source is rejected when the record is saved.

Association create keeps its image draft with the Entity being created. A composite Board create keeps target Entity and Board Data drafts separate; Board Data edit uses the Board item destination. Rich Board Data details resolve through that Board destination, while target Entity details retain normal Entity authorization. Board cards, lanes, headers, search, history, and tooltips remain plain-text previews and never fetch image bodies.

Field behavior is conditional, not just a checkbox:

  • Required, Visible, and Editable are each a rule that can be always on, always off, or a condition over the record’s data.
  • Each rule can apply to record creation, record update, or both.
  • A separate Read-only setting makes the runtime skip writes to the field entirely.

This is why the same field can be required in one situation and optional in another, or editable during creation but locked afterwards.

A field can define an initial value for new records. Configure it in the field editor under Default value:

  • Fixed value uses a value you enter now.
  • Current date is available for Date fields and is resolved in the workspace time zone when the record is created.
  • Current date and time is available for Date and time fields and is resolved when the record is created.

Fixed defaults are available for Yes/No, Whole number, Decimal, String, Text, Money, Select, scalar Reference, Date, Time, and Date and time fields. A multi-select default must contain one or more distinct configured options. A Reference default is selected through the existing record picker; only the workspace-local record ID is stored, while Number and Display Name are resolved according to current access. Defaults are not available for calculated fields, Line number fields, User, Role, File, Address, Classifier, multiple Reference, Inverse reference, or Table itself. Fields inside a Table can still have their own defaults for each new child row.

Defaults follow a strict missing-value rule:

  • Moltaro uses the default only when the field is absent while a new record or child row is created.
  • An explicitly cleared value, false, or 0 is kept and is not replaced.
  • Updating an existing record never reapplies a default.
  • Adding or changing a default does not update existing records.

Reference defaults are checked again when a record or new child row is saved. If the selected record was deleted, archived, became inaccessible, belongs to a different record type, or no longer satisfies Reference Eligibility, the save fails without partial changes or disclosure. A user can choose a permitted replacement or explicitly clear the field. Existing records are never rewritten.

Create forms show fixed values so the user can review or change them. A Current date default also shows the workspace-local date in its ordinary Date input, so it can be edited. This is a preview: if it is left untouched, the field is omitted from the request and Moltaro resolves the workspace date again when the record is actually created. Changing or clearing the preview sends that explicit value instead. An open create form updates an untouched preview if the workspace date changes at midnight. Current date and time continues to stay empty because the server resolves the exact instant on save. Reference defaults are hydrated into the normal Reference control before the first create-form rule evaluation. An untouched selection stays schema-owned and is omitted from the request; replacement or clear is sent explicitly. The same behavior applies to Date fields in new Table rows. Edit forms always show the stored value and never reapply a default.

  • Field behavior conditions control whether a field is visible, required, or editable in Create and Update operations. They can read fields in the same record and one scalar through a direct Reference, for example FacilityType.KoboName = 'poe'. Generated Forms load that referenced value automatically, including after a new selection. Invalid saved conditions block the Form with a configuration error instead of applying an incorrect result. See Field behavior conditions.
  • Uniqueness and indexes are entity-owned constraints defined over one table on the Schema tab, not a per-field flag.
  • Calculated fields store an expression instead of accepting manual input. A local calculation derives a value from the same record; an aggregate calculation (for example SUM(Positions, TotalPrice)) summarizes the child records of an Inverse reference field.
  • Statements are named boolean conditions defined on the Schema tab. Screens and rules reuse them for filtering and highlighting; see Presentation and statements.
  • Search targets are explicit paths configured on the Search tab. String and Text fields are searchable directly; Address uses its full address and File uses file name and description. Reference, Inverse reference, and Table fields are path segments rather than terminals. Display name, number, comments, and attachments are supported system terminals. Paths may cross up to the configured relation depth, and runtime field and record access is enforced at every segment. See Record search for matching semantics, path examples, and change guards.
  • Semantic roles add meaning on top of a type: String and Text fields can be marked as Markdown for rich rendering, and a Whole number field on the primary table can act as a Line number that the runtime maintains as a dense counter within a group defined by a Reference field.

Integrations read the configured schema and write field values through the public API:

  • List entity definitions and return one entity definition expose the schema of each record type, including field keys and types.
  • The Entity Instances operations create, read, query, and update records. Instance payloads return a Fields dictionary keyed by field key; each entry carries a State and a Value, and restricted fields are present with no value.
  • Money amounts and Decimal field-envelope values are serialized as strings in API JSON to avoid floating-point precision loss. Decimal strings are padded to the field’s configured scale. Reference values resolve to a compact payload with a Resolved, NotFound, or Restricted state.
  • Date-and-time values are ISO 8601 timestamps with an explicit Z or numeric offset. Moltaro returns their equivalent UTC value and preserves precision through microseconds.
  • Field definition responses expose the typed DefaultValue configuration. Entity Instance create requests may omit a field to use its default. Sending the key with null, false, 0, an empty string, or an empty selection is explicit caller input and suppresses the default.
  • A Markdown field is identified by its SemanticRole; its Value remains the exact Markdown source. Read envelopes can also include PlainTextPreview for compact clients. Integrations must not treat that preview as the editable or transferable value, and they must not render the source as trusted HTML. Inline attachment tokens are opaque identifiers, not URLs or access grants; clients must use the authenticated destination-scoped Markdown resolver instead of building a file endpoint.