Skip to content

RelatedModel

RelatedModel = object

Defined in: packages/schema/src/model.ts:666

Records of another resource on the record page: those whose field holds this record’s key or, with through, those whose field holds one of the key values of the through records that point at this record (a join table). With from, those whose field holds the value of that field of this record. See Related records.

optional columns?: string[]

Defined in: packages/schema/src/model.ts:695

Fields of resource, through relations too (unitId.propertyId).


optional display?: string

Defined in: packages/schema/src/model.ts:704

The display of resource’s list it opens in, such as cards; the list’s default when omitted.


optional empty?: string

Defined in: packages/schema/src/model.ts:706

The text when nothing matches.


field: string

Defined in: packages/schema/src/model.ts:676

The filterable field of resource matched against this record’s key, or with through against the join records’ keys, or with from against that field’s value.


optional filter?: string

Defined in: packages/schema/src/model.ts:691

An AIP-160 filter on the listed records.


optional from?: string

Defined in: packages/schema/src/model.ts:678

A field of this record whose value field is matched against instead of its key; not with through.


optional help?: string

Defined in: packages/schema/src/model.ts:672

A line under the title.


optional hideEmpty?: boolean

Defined in: packages/schema/src/model.ts:708

Leave the section off the page while it has no records.


kind: "related"

Defined in: packages/schema/src/model.ts:668

A related records section.


optional limit?: number

Defined in: packages/schema/src/model.ts:702

How many records it shows, the first in sort order; with more, it says so (“The first 10 of 37.”) beside “View all”, which opens the rest in the list.


optional open?: string

Defined in: packages/schema/src/model.ts:700

The relation field of resource whose record a row opens, for rows that are links between this record and another (a join resource); by default the one relation in resource’s primary key besides field, when there is exactly one.


resource: string

Defined in: packages/schema/src/model.ts:674

The resource whose records it lists.


optional sort?: string

Defined in: packages/schema/src/model.ts:693

An AIP-132 order of the listed records.


optional through?: object

Defined in: packages/schema/src/model.ts:680

The join records between this record and the listed ones.

field: string

Its filterable relation that holds this record’s key.

optional filter?: string

An AIP-160 filter on the join records.

optional key?: string

Its field whose values pick the listed records; its primary key when omitted.

resource: string

The join resource.


title: string

Defined in: packages/schema/src/model.ts:670

The section’s title.


optional when?: RecordWhen

Defined in: packages/schema/src/model.ts:710

Whether it shows on the form, the read view or both, or a condition on the saved record that it shows while it holds.