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.
Field types
Section titled “Field types”These are the field types the Constructor offers, using the same names you see in the field editor:
| Field type | What it stores |
|---|---|
| Yes/No | A true/false value. |
| Date | A calendar date without a time component. |
| Time | A time of day without a date. |
| Date and time | One exact moment. It is displayed and edited in the workspace time zone as one minute-precision field; users do not edit an offset. |
| User | A link to a workspace user. This is people-valued data; it does not grant access by itself. |
| Role | A link to a workspace role. |
| Whole number | An integer value. Can carry the Line number semantic role (see below). |
| Decimal | A number with configured precision (1–28) and scale. Precision and scale are required settings. |
| File | A governed workspace file reference. File access is checked when the file is attached; storage goes through Moltaro file services. |
| Address | A 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. |
| Select | One 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. |
| Classifier | One category from a bound hierarchical Classifier Catalog. It is available on the primary table, stores one category, and displays the category’s current breadcrumb. |
| String | Single-line text with a maximum length (default 512, up to 4096). |
| Text | Long multi-line text without a length cap. |
| Table | Repeatable child rows with their own columns. Rows belong to the owning record and have no independent identity, access, or detail page. |
| Money | An amount plus an ISO currency code. A base currency is a required setting. |
| Reference | A link to a record of another entity definition. See Relationships and containment for reference settings. |
| Inverse reference | The 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.
Markdown fields
Section titled “Markdown fields”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.
Required, visible, and editable are rules
Section titled “Required, visible, and editable are rules”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.
Default values
Section titled “Default values”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, or0is 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.
Other schema rules
Section titled “Other schema rules”- 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.
Schema in the API
Section titled “Schema in the API”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
Fieldsdictionary keyed by field key; each entry carries aStateand aValue, 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, orRestrictedstate. - Date-and-time values are ISO 8601 timestamps with an explicit
Zor numeric offset. Moltaro returns their equivalent UTC value and preserves precision through microseconds. - Field definition responses expose the typed
DefaultValueconfiguration. Entity Instance create requests may omit a field to use its default. Sending the key withnull,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; itsValueremains the exact Markdown source. Read envelopes can also includePlainTextPreviewfor 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.
Where to go next
Section titled “Where to go next”- Read Relationships and containment for references, inverse references, and record-to-record links.
- Read Fields and field types for the user-facing view of fields.
- Read Projection for how field values are prepared for lists and screens.