app:fields

Lists all fields defined within a table

Options

NameTypeDescription
org_idstringThe organization ID that scopes the operation
schema_idstringThe name of the schema (database) that contains the table
tablestringThe name of the table whose fields to list

Outputs

NameTypeDescription
items[]FieldThe list of field definitions in the table
  ↳ namestringIs the column / input name. Must be unique within its table or input set and must not collide with reserved record fields (id, created_at, updated_at, deleted_at, version, version_owner_id) when used as a DB column.
  ↳ typeFieldTypeIs the field's data type. See the FieldType constants for the supported values.
  ↳ requiredboolMarks the field as non-nullable / mandatory. Inserts and updates that omit a required field (and provide no Default) are rejected.
  ↳ defaultanyIs the value applied when a record is inserted (or a form is rendered) without an explicit value for this field. A nil or zero value means no default is applied.
  ↳ related_tablestringIs the name of the target table for relation fields. Required when Type is has_one, has_many, or belongs_to; ignored otherwise.
  ↳ related_fieldstringIs the name of the foreign-key field on the related table. Used only by has_many to identify which column on RelatedTable points back to this record.
  ↳ descriptionstringIs a human-readable explanation of the field's purpose. Surfaced in generated documentation and GUI tooling; has no effect on storage or validation.
  ↳ options[]stringIs the ordered list of permitted string values for FieldTypeEnum. Required for enum fields; ignored for all other types.
  ↳ labelstringIs the UI label for the field. Renderers fall back to Name when empty.
  ↳ option_labels[]stringIs a parallel array to Options that carries display labels for enum values. Index i in OptionLabels labels Options[i]. When empty, the value itself is shown.
  ↳ default_sourcestringDeclares the origin of a dynamic default value when the server has resolved one into Default. Allowed sources: "now", "today". The set is closed and intentionally excludes identity sources (org_id, user_id), which are injected as workflow vars by the server, never surfaced as form fields.
  ↳ relation_label_fieldstringNames the field on the related record that the UI should show as the dropdown label. When empty, the renderer falls back to the related record's id. Only meaningful when Type is a relation.

Example

name: List a table's fields
actions:
  - name: fields
    component: app:fields
    vars:
      org_id: "{{ var.org_id }}"
      schema_id: content
      table: articles

outputs:
  fields: "{{ fields.items }}"