back to docs
[reference] fields field-types columns reference

Fields Reference

Complete reference of all field types in dForge: text, number, date, dropdown, lookup, formula, and more.

published · updated

Overview

Every entity column has a field type (fieldTypeCd) that determines how data is stored, validated, displayed, and edited. The field type is paired with a PostgreSQL data type (dbDatatype) for physical columns.

Column Types

Most columns are physical database columns and don’t need a columnType. Set it only for the special cases below:

columnTypeDescription
(omitted)Regular physical database column. Stores a value.
RReference — virtual column. Displays a value from a related entity via a foreign key (N:1 lookup). Always paired with a hidden FK column.
SSet — virtual column. Displays a collection of child records (1:N relationship).
FFormula — virtual column. Calculated value from an expression. Requires baseDatatypeCd.
GGenerated — physical column auto-maintained by the database.

Text Fields

Field TypeDisplay NameDescription
textTextSingle-line text input. Stored as varchar. Use maxLen to set length.
emailEmailText with email format validation. Stored as varchar.
phonePhoneText with phone number format. Stored as varchar.
urlURLText displayed as a clickable link. Stored as varchar.
textareaMultiline TextMulti-line text area. Stored as text. Configure defaultLines and maxLines in params.
multilineRich TextRich text content with formatting. Stored as text.

To completely hide a column from the UI, give it empty flags ("") instead of using a hidden field type.

Number Fields

Field TypeDisplay NameDescription
numberNumberNumeric input. Supports min/max validation via params.
currencyCurrencyNumber formatted with currency symbol. Set currency param (e.g., “USD”, “EUR”). 2 decimal precision.
percentPercentNumber displayed with % symbol. 2 decimal precision. Default range 0-100.

Number Params

Configure via column.params:

  • min — minimum allowed value
  • max — maximum allowed value
  • currency — ISO currency code for currency fields (e.g., “USD” displays as $)

Date & Time Fields

Field TypeDisplay NameDescription
dateDateDate picker. Stored as date.
datetimeDate & TimeDate and time picker. Stored as timestamp.
timeTimeTime picker. Stored as time.

Boolean Fields

Field TypeDisplay NameDescription
checkboxCheckboxTrue/false toggle.

Selection Fields

Field TypeDisplay NameDescription
dropdownDropdownSingle selection from a list of options.
flagsFlagsMulti-value selection. Displayed as buttons or checkboxes.
tagsTagsFree-form or predefined tag input.

Options Configuration

Dropdown and flags options are defined in column.params.options:

{
  "options": ["New", "In Progress", "Completed"]
}

Or with labels, icons, and colors:

{
  "options": [
    { "value": "new", "label": "New", "color": "#3B82F6" },
    { "value": "active", "label": "Active", "color": "#10B981" },
    { "value": "closed", "label": "Closed", "color": "#6B7280" }
  ]
}

Conditional Options (Option Sets)

Options can change based on another field’s value using optionSets:

{
  "optionSets": {
    "condition": "object_type",
    "map": {
      "Entity": ["S", "I", "U", "D", "C"],
      "Action": ["E"],
      "Report": ["E"],
      "*": ["E"]
    }
  }
}

Relationship Fields

Field TypeDisplay NameColumn TypeDescription
lookupLookupR (Reference)Searchable dropdown that links to another entity. Creates a foreign key relationship.
gridDetail GridS (Set)Embedded grid showing child records of a 1:N relationship.
userUser PickerD (Data)Special lookup that searches the user table.
entitylinkEntity LinkD (Data)Polymorphic link to any entity type. Stored as JSON.

Lookup Configuration (FK + Reference Pattern)

A lookup needs two columns: a hidden physical foreign key column and a virtual reference column that renders the lookup control.

"account_id": {
  "dbDatatype": "cuid",
  "flags": "EM",
  "orderNum": 30,
  "description": "Account ID"
},
"account": {
  "columnType": "R",
  "fieldTypeCd": "lookup",
  "flags": "VEM",
  "orderNum": 35,
  "description": "Account",
  "link": {
    "entity": "crm.account",
    "thisKey": "account_id",
    "otherKey": "account_id"
  }
}

The hidden FK stores the value; the virtual reference renders the autocomplete and displays the linked record’s toString template.

Media Fields

Field TypeDisplay NameDescription
imageImageImage upload with preview.
fileFileFile upload with download link.
colorColor PickerColor selection with hex value storage.

Data Fields

Field TypeDisplay NameDescription
jsonJSON EditorStructured JSON data with syntax highlighting.

Formula Columns

Formula columns (column type F) calculate values from expressions. They have no physical database column — values are computed at runtime.

Sync Formulas

Evaluated immediately from local record data:

  • [quantity] * [unit_price] — multiplies two fields
  • [first_name] + ' ' + [last_name] — concatenates strings
  • IF([amount] > 1000, 'High', 'Standard') — conditional logic

Async Formulas (Navigation)

Follow reference paths to fetch data from related entities:

  • [account_id].[industry] — gets the industry from the linked account
  • [order_id].[customer_id].[name] — two-level navigation

Async formulas require a separate data fetch and are resolved after sync formulas.

Formula Requirements

Formula columns must specify:

  • baseDatatypeCd — the result type (e.g., “string”, “number”)
  • fieldTypeCd — how to display the result
  • formula — the expression text

Column Params Reference

All field types support these params via column.params:

ParamTypeDescription
optionsarrayDropdown/flags options
optionSetsobjectConditional options based on another field
min / maxnumberNumber validation bounds
currencystringISO currency code for currency fields
alignstringText alignment override (left, center, right)
gridWidthnumberDefault column width in grid view
defaultLinesnumberInitial textarea height (lines)
maxLinesnumberMaximum textarea height (lines)
limWidthbooleanLimit field width in card/form view

Column Flags

Columns use single-character flags to control behavior. Combine them as a single string (e.g., "VEM").

FlagMeaning
VVisible — shown in grid and card views
EEditable — user can modify the value
MMandatory — required for insert (red asterisk in UI)
OOn insert — set only on insert, not editable after
SSortable — column can be sorted
GGroupable — column can be used for grouping
FFilterable — column appears in the filter row
CCompact — included in compact/list views

Common combinations:

CombinationUse case
"VEM"Standard required input field
"VE"Standard optional input field
"V"Read-only display (formulas, computed values)
"EM"Hidden FK column (paired with a Reference)
""Completely hidden system column

Flags can be overridden per folder, so the same field can be editable in one folder and read-only in another.

Number Sequences

Document entities (invoices, orders, quotes) can auto-generate human-readable numbers on insert. Define a numberSequence at the entity level:

"numberSequence": {
  "column": "invoice_number",
  "prefixSettingCd": "invoice_number_prefix",
  "defaultPrefix": "INV-",
  "pattern": "{prefix}{yyyy}-{seq:3}",
  "resetPeriod": "year"
}
PropertyDescription
columnTarget column to auto-fill on insert
prefixSettingCdModule setting code for the prefix (folder-scoped, so each branch can use its own prefix)
defaultPrefixFallback prefix if the setting isn’t configured
patternFormat pattern with placeholders
resetPeriodWhen the counter resets: year, month, day, or never

Pattern placeholders: {prefix}, {yyyy}, {yy}, {mm}, {dd}, {seq:N} (zero-padded width).

Example output: INV-2026-001, INV-2026-002, …

Constraints

Add CHECK constraints at the entity level for server-side and client-side validation:

"constraints": {
  "chk_amount_positive": {
    "type": "check",
    "expression": "amount IS NULL OR amount >= 0",
    "message": "Amount cannot be negative"
  }
}

Constraints become real PostgreSQL CHECK constraints on the table and are also evaluated client-side via the formula evaluator for immediate UI feedback.

Traits

Traits auto-add common columns. Specify them at the entity level — they apply before your fields, so you can override individual columns if needed.

TraitColumns added
identity{entity}_id (int8 primary key, snowflake ID)
auditcreated_by, modified_by, created_date, modified_date
"traits": ["identity", "audit"]
/ was this helpful?

Stuck on something?
Tell us.

We read every message and update the docs based on what readers ask. The fastest way to improve the docs is to write to us.