Relation

The Relation type can handle relations to other record types. They will be available to select from the Record Selector.

It corresponds with the TCA type => 'group'.

SQL overrides via alternativeSql allowed: yes.

Settings

allowed
Required:true
Type:string (table name, comma-separated)

One or more tables, that should be referenced.

maxitems
Required:false
Type:integer

Maximum number of items. Defaults to a high value. JavaScript record validation prevents the record from being saved if the limit is not satisfied.

minitems
Required:false
Type:integer

Minimum number of items. Defaults to 0. JavaScript record validation prevents the record from being saved if the limit is not satisfied. The field can be set as required by setting minitems to at least 1.

For more advanced configuration refer to the TCA documentation.

Examples

Minimal

name: example/relation
group: common
fields:
  - identifier: record_select
    type: Relation
    allowed: 'some_table'

Advanced / use case

name: example/relation
group: common
fields:
  - identifier: page_select
    type: Relation
    allowed: 'pages'
    maxitems: 1,
    suggestOptions:
      default:
        additionalSearchFields: 'nav_title, url'
        addWhere: 'AND pages.doktype = 1'