cardinal

RecType key reference

Every key a RecType YAML file and its fields accept.

The compiler refuses any key not in these tables. RecType YAML walks through a full example.

RecType keys

KeyDefaultMeaning
schemaAlways 1
nameTitle Case with spaces, such as Sales Order
moduleOne of the manifest's modules
labelA display name other than name
descriptionWhat the records are. Eden's catalog reads it
aitruefalse keeps the RecType out of the AI catalog
autonamehash, field:<f>, prompt, UUID, autoincrement, naming_series:, a series or format:
istablefalseA child RecType
issinglefalseOne record, such as a settings page
is_submittablefalseDraft, Submitted, Cancelled
is_treefalseA parent Link and is_group
track_changesfalseA Version row per save
allow_renamefalseWriters may rename or merge records
allow_auto_repeatfalseAn Auto Repeat may copy records on a schedule
show_name_in_global_searchfalseGlobal search indexes the record's name
title_field, search_fields, image_fieldWhat Link search and cards show
sort_field, sort_orderThe list's order. sort_order is ASC or DESC
quick_entryfalseNew records open in a dialog
editable_gridtrueChild rows edit in the grid
fields[]The field list, in form order
permissions[]Role rules: role, rights, permlevel, if_owner
permission_types[]Extra rights, such as approve
row_rules, role_rules[]Per-record access. See Role rules and sets
inherit_permission{rectype_field, name_field}, access follows another record
self_access{fields, read_only} a user may touch on their own row
system_manager_onlyfalseOnly a System Manager writes these records
links, actions, states[]Connections, form buttons and list colours. See Form and list options
indexes[]{fields, unique} database indexes
calendar, ganttField maps for the Calendar and Gantt views
max_attachments0A cap on attached files
has_web_view, route, is_published_field, allow_guest_to_viewRecords with a public page. See Web pages
allow_web_formfalseWeb Forms may target the RecType
default_print_formatThe Print Format the print view opens with
indexfalseDerived rows only the app writes. See Index RecTypes
virtualfalseCore only. An app's YAML that sets it fails the build

Field keys

KeyMeaning
fieldname, fieldtypeRequired. The column name and one of the field types
label, descriptionWhat the form shows above and below the control
optionsDepends on the type. See below
reqd, unique, defaultdefault takes a YAML scalar, Today, Now or __user
depends_onAn expression over doc that shows the field
mandatory_depends_on, read_only_depends_on, collapsible_depends_onExpressions that make it required, read-only, or a section collapsible
fetch_from, fetch_if_empty<link field>.<field>. With fetch_if_empty, only fills an empty value
link_filters[field, operator, value] rows on a Link's target
ignore_user_permissionsUser Permissions on the target do not restrict this Link
allow_in_quick_entryShows in the quick entry dialog
in_list_view, in_standard_filter, in_global_searchWhere the field shows up
hidden, read_only, allow_on_submit, no_copy, set_only_onceEdit rules
permlevelThe level whose rules govern the field, 0 by default
precision, length, non_negativeValue limits
print_hide, print_hide_if_no_value, print_widthPrint layout
translatableValues go through translations
ignore_xss_filterStores HTML without the sanitizer
trustlookups or script. Puts the field under the System Manager write guard
aifalse keeps the field out of the AI catalog

What options holds

Field typeoptions
Link, Table, Table MultiSelectThe target RecType
Select, AutocompleteThe choices, one per line
Dynamic LinkThe field that holds the target RecType
CurrencyThe field that holds the currency
ImageThe Attach Image field to show
DataEmail, Name, Phone, URL, Barcode or IBAN
CodeThe language
RatingThe number of stars
HTMLThe markup to show

Expressions

The *_depends_on keys and row_rules use Cardinal's expression language over doc. Quote a value that holds quotes:

- {fieldname: route, fieldtype: Data, label: Route, depends_on: 'doc.type == "Route"', mandatory_depends_on: 'doc.type == "Route"'}
- {fieldname: service_items_section, fieldtype: Section Break, label: Service Items, collapsible_depends_on: "false"}

Check your files

cardinal meta check

It compiles every app's RecTypes, permission files and website files and prints each error with its file and path, such as fields[4].options.

On this page