RelatedModel
RelatedModel =
object
Defined in: packages/schema/src/model.ts:946
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.
Properties
Section titled “Properties”actions?
Section titled “actions?”
optionalactions?:string[]
Defined in: packages/schema/src/model.ts:984
Named actions of resource’s view, by name, as buttons on each card; only with presentation: 'cards' or 'compact'.
button?
Section titled “button?”
optionalbutton?:RowButtonModel
Defined in: packages/schema/src/model.ts:990
A button on each row, or each card, to an address its fields name.
columns?
Section titled “columns?”
optionalcolumns?:string[]
Defined in: packages/schema/src/model.ts:975
Fields of resource, through relations too (unitId.propertyId): the table’s columns, or the fields each card shows.
count?
Section titled “count?”
optionalcount?:boolean
Defined in: packages/schema/src/model.ts:1005
Show how many records match beside the title, such as “Open tasks 3”, as the reader may see them.
display?
Section titled “display?”
optionaldisplay?:string
Defined in: packages/schema/src/model.ts:999
The display of resource’s list it opens in, such as cards; the list’s default when omitted.
empty?
Section titled “empty?”
optionalempty?:string
Defined in: packages/schema/src/model.ts:1001
The text when nothing matches.
field:
string
Defined in: packages/schema/src/model.ts:956
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.
filter?
Section titled “filter?”
optionalfilter?:string
Defined in: packages/schema/src/model.ts:971
An AIP-160 filter on the listed records.
optionalfrom?:string
Defined in: packages/schema/src/model.ts:958
A field of this record whose value field is matched against instead of its key; not with through.
optionalhelp?:string
Defined in: packages/schema/src/model.ts:952
A line under the title.
hideEmpty?
Section titled “hideEmpty?”
optionalhideEmpty?:boolean
Defined in: packages/schema/src/model.ts:1003
Leave the section off the page while it has no records.
kind:
"related"
Defined in: packages/schema/src/model.ts:948
A related records section.
limit?
Section titled “limit?”
optionallimit?:number
Defined in: packages/schema/src/model.ts:997
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.
lines?
Section titled “lines?”
optionallines?:true
Defined in: packages/schema/src/model.ts:1013
The record’s lines, such as an invoice’s: every record of resource within this one, in their .position() order,
shown whole and edited in place on the record’s form, saved with it; see
Record lines.
optionalopen?:string
Defined in: packages/schema/src/model.ts:995
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.
presentation?
Section titled “presentation?”
optionalpresentation?:RelatedPresentation
Defined in: packages/schema/src/model.ts:982
cards shows each record as a card stacked full width, its columns and actions on it; compact as a card of
one or two lines, its title and time on the first, its columns inline without labels and its actions beside
them; record shows the columns of the first record in full, with a link to its page; the list’s table or display
when omitted.
resource
Section titled “resource”resource:
string
Defined in: packages/schema/src/model.ts:954
The resource whose records it lists.
optionalsort?:string
Defined in: packages/schema/src/model.ts:973
An AIP-132 order of the listed records.
through?
Section titled “through?”
optionalthrough?:object
Defined in: packages/schema/src/model.ts:960
The join records between this record and the listed ones.
field:
string
Its filterable relation that holds this record’s key.
filter?
Section titled “filter?”
optionalfilter?:string
An AIP-160 filter on the join records.
optionalkey?:string
Its field whose values pick the listed records; its primary key when omitted.
resource
Section titled “resource”resource:
string
The join resource.
optionaltime?:string
Defined in: packages/schema/src/model.ts:986
A date or timestamp field of resource each compact card shows beside its title, as its view formats it; only with presentation: 'compact'.
title:
string
Defined in: packages/schema/src/model.ts:950
The section’s title.
optionaltone?:string
Defined in: packages/schema/src/model.ts:988
An enum field of resource whose value colours each card’s left edge, by its view’s valueColors; only with cards.
optionalwhen?:RecordWhen
Defined in: packages/schema/src/model.ts:1007
Whether it shows on the form, the read view or both, or a condition on the saved record that it shows while it holds.