ActionModel
ActionModel =
object
Defined in: packages/schema/src/model.ts:1471
A named action of a view (.actions((a) => ...)); see Named actions.
Properties
Section titled “Properties”bulk:
boolean
Defined in: packages/schema/src/model.ts:1486
Whether the action is offered for the rows selected in the list, running on each it applies to (bulk).
confirm?
Section titled “confirm?”
optionalconfirm?:string
Defined in: packages/schema/src/model.ts:1484
The question the button asks before it runs the action.
optionalicon?:string
Defined in: packages/schema/src/model.ts:1482
The button’s icon: archive, arrow-right-left, ban, bath, bed, bell, bookmark, calendar, camera, copy, cpu,
door-open, download, external-link, file-text, hard-drive, heart, house, key, land-plot, leaf, memory,
network, play, plug, power, restart, ruler, send, server, stop, tag, terminal, upload, wallet or
wrench; another name shows a lightning bolt.
inputs?
Section titled “inputs?”
optionalinputs?:ActionInputModel[]
Defined in: packages/schema/src/model.ts:1501
What the button asks for in a dialog before the action runs: a handler gets the answers as values, an update writes them through set.
label:
string
Defined in: packages/schema/src/model.ts:1475
The button’s label.
mailbox?
Section titled “mailbox?”
optionalmailbox?:boolean
Defined in: packages/schema/src/model.ts:1506
Whether the handler sends mail from the person’s own mailbox (mailbox: true): its dialog offers to connect one
instead of running while none is linked.
name:
string
Defined in: packages/schema/src/model.ts:1473
The action’s name, which <Action name="..." /> and handlers use.
otherwise?
Section titled “otherwise?”
optionalotherwise?:"hide"|"disable"
Defined in: packages/schema/src/model.ts:1493
What the button does on a record when does not hold for: it is left out, or shown disabled with reason.
reason?
Section titled “reason?”
optionalreason?:string
Defined in: packages/schema/src/model.ts:1495
Why the button is disabled on a record when does not hold for, shown to the user.
optionalrun?:ActionRun
Defined in: packages/schema/src/model.ts:1499
What it does; without it the app runs the handler registered under name.
variant?
Section titled “variant?”
optionalvariant?:"danger"
Defined in: packages/schema/src/model.ts:1497
danger draws an action that destroys or interrupts something, such as Force off, in red.
optionalwhen?:string
Defined in: packages/schema/src/model.ts:1491
An AIP-160 condition over the record’s own fields, as status = 'running', for the records the action applies to.
It only decides what the buttons show; the API’s access rules decide what may run.