Alerts Technical Reference
Alert State
AlertState
Alert section of Adaptable State, including Initial State.
Each definition fires when its condition is met. A rule-based alert sets Scope and Rule. A row-change alert sets RowChangeTrigger ('Added' or 'Removed'). A scheduled alert sets Schedule and has no rule. MessageType sets the colour and icon. MessageHeader is the title and MessageText is the body.
Alerts to evaluate. Each one is a rule-based alert (Scope + Rule), a row-change alert (RowChangeTrigger), or a scheduled alert (Schedule).
Rule Based Alert Definition
RuleBasedAlertDefinition
Alert that fires when data matches a rule in the given column scope
AlertDefinitionBase
Fields every alert definition has.
Name identifies the alert. MessageType is required and sets the colour, icon and log level ('Info', 'Success', 'Warning' or 'Error'). MessageHeader is the notification title. MessageText is the body. Suspend with IsSuspended.
string
Title of displayed Alert Message
string
Body of the displayed alert. The title is .
Tokens such as the column and the old and new values are substituted when the alert fires. When omitted, a rule-based alert uses the scope and the rule, and a row-change alert uses a count of the rows that were added or removed. alertOptions.alertMessageText overrides this text when it returns a string.
Type of Alert: 'Info', 'Success', 'Warning', 'Error'; influences Alert colour, icon and logging
string
Name of the Alert Definition
boolean
Sets Entity to ReadOnly (overwriting a Strategy Entitlement of 'Full')
boolean
Suspends (i.e. turns off) an Adaptable Object
string |AlertButtonForm
Form to display in Alert with buttons and inputs
Properties which set what happens when the Alert is triggered (notification and grid behaviours)
string
AdapTableQL boolean expression deciding when the Alert is triggered.
The kind is inferred from the text: a per-row rule such as[price] > 100, an aggregated rule such as SUM{[notional]} > 1000000,
or a live (observable) rule such as CHANGE_COUNT{[price], WITHIN(5m)} >= 3.
Where Alert can be triggered: one, some or all columns or DataTypes
When a live rule (one reading change history — CHANGE_COUNT[price],
WITHIN(5m) = 3 — or the clock) fires. Live rules are re-evaluated on
data changes and on window expiry alike, and fire only on the transition
from false to true (per row, or once for a grid-level rule). Ignored for
every other rule.
boolean
Sets Entity to ReadOnly (overwriting a Strategy Entitlement of 'Full')
boolean
Suspends (i.e. turns off) an Adaptable Object
Alert Properties
RuleAlertProperties
Properties for rule-based alerts (presentation plus grid behaviours)
AlertPresentationProperties
Notification properties shared by rule-based and scheduled alerts
boolean
Displays a notification when Alert is triggered
boolean
Shows the alert message in the System Status panel
boolean
Logs the Alert message to the console
NotificationsOptions['duration']
How long the notification stays visible. When omitted, notificationsOptions.duration is used.
boolean
Shows the alert text in the element named by containerOptions.alertContainer
boolean |AdaptableStyle
Colours the cell that triggered the alert. true uses the colour for MessageType. An is applied instead of that colour.
boolean |AdaptableStyle
Colours the row that triggered the alert. true uses the colour for MessageType. An is applied instead of that colour.
boolean
Grid will 'jump' to the changed cell which triggered the Alert
boolean
Grid will 'jump' to the newly added row which triggered the Alert
boolean
Automatically prevent any cell edit which triggered the Alert (i.e. validation)
false
TriggerPolicy is an AlertTriggerPolicy:
AlertTriggerPolicy
Firing policy of a live (observable / clock-reading) alert rule.
'BecomeTrue'
'BecomeTrue' (the only policy, and the default): fire when the rule
turns from false to true; stay silent while it remains true; a rule that
is already true when the Alert is created does not fire until it turns
false and true again.
Scope is a Column Scope:
ColumnScope
Which columns an object applies to. Set exactly one shape.
true
Matches every column. All must be true.
('text' | 'number' | 'boolean' | 'date' | 'textArray' | 'numberArray')[]
Data types to match, for example ['number'] or ['text', 'textArray']. Object, tuple and unknown columns are not scope data types. Name those columns with ColumnIds.
string[]
Column ids to match. These are AG Grid colId values.
string[]
AG Grid column type names, the strings set on colDef.type.
Schedule Based Alert Definition
ScheduledAlertDefinition
Alert that fires on a schedule (no rule or column scope)
AlertDefinitionBase
Fields every alert definition has.
Name identifies the alert. MessageType is required and sets the colour, icon and log level ('Info', 'Success', 'Warning' or 'Error'). MessageHeader is the notification title. MessageText is the body. Suspend with IsSuspended.
string
Title of displayed Alert Message
string
Body of the displayed alert. The title is .
Tokens such as the column and the old and new values are substituted when the alert fires. When omitted, a rule-based alert uses the scope and the rule, and a row-change alert uses a count of the rows that were added or removed. alertOptions.alertMessageText overrides this text when it returns a string.
Type of Alert: 'Info', 'Success', 'Warning', 'Error'; influences Alert colour, icon and logging
string
Name of the Alert Definition
boolean
Sets Entity to ReadOnly (overwriting a Strategy Entitlement of 'Full')
boolean
Suspends (i.e. turns off) an Adaptable Object
Notification properties for scheduled alerts (no grid behaviours)
boolean
Sets Entity to ReadOnly (overwriting a Strategy Entitlement of 'Full')
boolean
Suspends (i.e. turns off) an Adaptable Object
Alert Properties
ScheduledAlertProperties
Properties for scheduled alerts (notification only)
AlertPresentationProperties
Notification properties shared by rule-based and scheduled alerts
boolean
Displays a notification when Alert is triggered
boolean
Shows the alert message in the System Status panel
boolean
Logs the Alert message to the console
NotificationsOptions['duration']
How long the notification stays visible. When omitted, notificationsOptions.duration is used.
boolean
Shows the alert text in the element named by containerOptions.alertContainer
Schedule
Schedule
When a scheduled alert or export runs.
IsOneOff: true runs once at RunAt (an ISO date-time). IsOneOff: false repeats on CronExpression, a 5-field cron (minute, hour, day of month, month, day of week). Weekdays in that cron are 0–6 with Sunday as 0; 1-5 is Monday to Friday.
string
Standard 5-field cron (minute hour day-of-month month day-of-week); e.g. weekdays at 09:30 → 30 9 * * 1-5
boolean
true runs once, at RunAt. false repeats on CronExpression.
string
ISO datetime for a one-off run (local time); set when IsOneOff is true
Alert Options
AlertOptions
Options related to Alerts in Adaptable.
AlertForm<TData>[]
Full definitions of Alert Forms - the names of which are provided in Alert State
(alertMessageContext:AlertMessageContext<TData>) => string | undefined
Function providing Header to display in Alert; if empty, AdapTable provides dynamically
(alertMessageContext:AlertMessageContext<TData>) => string | undefined
Function providing Message to display in Alert; if empty, AdapTable provides dynamically
number
How long (in ms) a Cell will be highlighted when an Alert fires
2000
CommandHandler<TData>[]
Custom onClick Handlers for Buttons (displayed in Alert Forms)
boolean
When a single batch action (e.g. Bulk Update, Smart Edit) triggers multiple Alerts from the
same Alert Definition, consolidate them into a single Alert (with an occurrence count) rather
than showing one Alert per changed cell.
Per-cell effects (cell/row highlighting, console logging, the AlertFired event) still fire
for every change; only the "once" effects (the stored Alert, the toast notification and any
jump-to-cell/row) are consolidated. Alerts that use a bespoke Alert Form are never consolidated.
true
Whether Alert rule is evaluated against the rawValue or formattedValue of the changed cell data
'rawValue'
number
How many alerts held in State at any one time; when limit is breached, oldest alert will be removed
20
number
How long (in ms) a Row will be highlighted when an Alert Fires
4000
boolean
Shows Alert if Primary Key column in Adaptable Options is not present or incorrect
false
number
How long (in ms) Alert panel in Status Bar highlights when an Alert Fires
2000
dataChangeDetectionPolicy is a DataChangeDetectionPolicy:
| Value |
|---|
'rawValue' |
'formattedValue' |
alertForms entries are { name: string; form: AdaptableForm }. The form callback receives an AlertFormContext:
AlertFormContext
Context required by functions when using an Alert Button
AdaptableAlert<TData>
Alert that has been triggered
Custom application Context provided in AdaptableOptions.adaptableContext
The form is an AdaptableForm:
AdaptableForm
Expand
Defines the form. fields is a list of fields, rows of fields, or field groups. buttons are the form buttons. layout is rows (the default) or inline.
AdaptableForm
Defines a form which appears dynamically; used by Alerts, Export Custom Destinations and Dashboard Custom Toolbars.
string
Additional information to appear in the Form
Collection of Dynamic Fields and Field Groups to display.
Items can be:
- a single (rendered on its own row in the
default rows layout, or as one cell in the inline layout),
- an array of (rendered side-by-side on the
same row in the rows layout), or
- an (a labelled section that
visually groups related fields).
How the form's fields are arranged on screen.
- rows (default): each field on its own row, label on the left and
input on the right. Suitable for popups / wizards.
- inline: fields are placed side-by-side on a single horizontal line,
with the label rendered immediately before its input. Designed for
compact contexts such as Dashboard Custom Toolbars where vertical
real-estate is scarce.
'rows'
(formData: TData, context: T) => void
Optional form-level submit hook.
Fired when the user presses Enter while focus is inside any field
input AND the form is currently valid. The full formData is passed
through, typed as TData if you've supplied a custom shape.
Use this as an ergonomic shortcut to avoid wiring an explicit "Submit"
button - or in addition to one, so power users can press Enter to
commit. If the form is invalid the hook is not invoked.
string
Title to appear in the Form
Each field is an AdaptableFormField:
AdaptableFormField
Defines a Field that appears in an Adaptable Form
boolean
For single select fields only. When the user clears the combobox,
whether to restore instead of leaving the field empty.
Defaults to true when defaultValue is set, otherwise false.
Set to false when an empty selection is a distinct state from the default.
string | boolean | number | Array<string | number | boolean>
Field Default Value - can be of type string, boolean, number, or forselect fields with multi: true an array of those.
For single select fields, this is also the value restored when the user
clears the combobox (unless is false).
boolean | ((formData:AdaptableFormData, context:BaseContext) => boolean)
Disable the field's input. Either a boolean or a function evaluated
against the current form data. Disabled fields render but the user
cannot edit them.
Field Type - dictates which UI control is rendered
string
Inline help text rendered immediately below the field's input. Useful
for short explanations such as "format: YYYY-MM-DD" or "min 3 chars".
string
Label to display in the Field
number | string
Maximum allowed value. For number and slider: the highest accepted
number. For date, time and datetime: the latest allowed value in
ISO format.
number
Maximum length for text and textarea fields.
number | string
Minimum allowed value. For number and slider: the lowest accepted
number. For date, time and datetime: the earliest allowed value
in ISO format (YYYY-MM-DD / HH:mm / YYYY-MM-DDTHH:mm).
number
Minimum length for text and textarea fields.
boolean
For select fields only. When true the field renders as a
multi-select combobox; the field's value is an array of selectedoption.values rather than a single value.
false
string
Name of the Field
(value: any, context:BaseContext) => void
Optional callback invoked whenever value of this field changes
AdaptableFormFieldOption[] | ((formData:AdaptableFormData, context:BaseContext) =>AdaptableFormFieldOption[] | Promise<AdaptableFormFieldOption[]>)
Items to populate the select and radio fieldTypes.
Either a static array, or a function that derives the options from the
current form data and Adaptable context. The function form may return
a Promise for asynchronously-loaded options - the form will render the
field with no items until the promise resolves.
string
Regular expression that the value of a text field must match.
string
Placeholder text shown inside text, textarea, number, date,time and datetime inputs when empty. For select fields it is
rendered as the empty-state label when no value is selected.
When omitted on a select field with a , the label of
the matching options entry is used as the empty-state label.
(params:AdaptableFormFieldRenderParams) => React.ReactNode
For custom fields only. Renders an arbitrary React node as the
field's input. Receives the current value, a setValue setter
(controlled), the current form data, the Adaptable context and the
resolved disabled state.
Use this as an escape hatch when none of the built-in fieldTypes
fit - e.g. to render a star-rating widget, a tag editor or any
bespoke control.
boolean
If true the field is treated as required. An empty value ('',null, undefined, or unchecked checkbox) will produce a validation
error.
number
Stepping interval for number, slider, time and datetime
fields.
string
Tooltip shown when hovering the field's label.
(value: any, formData:AdaptableFormData, context:BaseContext) => string | null | undefined
Custom field-level validation. Return an error message string to mark
the field invalid, or null/undefined if the value is valid.
Custom validation runs after built-in checks (required, min,max, pattern, etc.) - the first failing check wins.
fieldType is an AdaptableFormFieldType:
| Value |
|---|
'text' |
'textarea' |
'select' |
'radio' |
'date' |
'time' |
'datetime' |
'number' |
'slider' |
'color' |
'checkbox' |
'textOutput' |
'custom' |
Select and radio options are AdaptableFormFieldOption objects:
AdaptableFormFieldOption
One choice in a select or radio form field.
layout is an AdaptableFormLayout:
| Value |
|---|
'rows' |
'inline' |
buttons are AdaptableButton objects:
AdaptableButton
A button on a form, alert or toolbar.
label is the text. onClick runs when it is clicked and receives the button and the form or event context. buttonStyle and icon are optional. disabled and hidden are functions that return whether the button is disabled or hidden.
(button:AdaptableButton<CONTEXT_TYPE>, context: CONTEXT_TYPE) => boolean
Function that disables / enables the button based on its evaluation result
AdaptableIcon| ((button:AdaptableButton<CONTEXT_TYPE>, context: CONTEXT_TYPE) =>AdaptableIcon)
Icon for Button - can be object or function that provides a AdaptableIcon object
string | ((button:AdaptableButton<CONTEXT_TYPE>, context: CONTEXT_TYPE) => string)
Label for Button - can be string or function that provides string
(button:AdaptableButton<CONTEXT_TYPE>, context: CONTEXT_TYPE) => void
Function to invoke when button is clicked
string | ((button:AdaptableButton<CONTEXT_TYPE>, context: CONTEXT_TYPE) => string)
Tooltip for Button - can be string or function that provides string
buttonStyle is a ButtonStyle:
ButtonStyle
Appearance of an AdapTable button.
variant is 'text', 'outlined' (the default) or 'raised'. tone is the colour: 'neutral' (the default), 'success', 'error', 'warning', 'info', 'accent' or 'none'. className adds a CSS class.
string
CSS Classname to use for the Button
'success' | 'error' | 'neutral' | 'none' | 'warning' | 'info' | 'accent'
Button's Tone - values: 'success', 'error', 'neutral', 'none', 'warning', 'info', 'accent'
'neutral'
'text' | 'outlined' | 'raised'
How Button appears - values: 'text', 'outlined', 'raised'
'outlined'
commandHandlers entries are { name: string; handler: (button, context: AlertFormContext) => void }.
Alert API
Full programmatic access to Alerts and related features is available in Alert API.
This enables Alerts to be accessed, created, edited, deleted and shared programmatically.
AlertApi
Alert Definitions and fired alerts: read, edit, suspend, evaluate and display them.
Adds given Alert Definition to Adaptable State
Fires a scheduled Alert Definition now: its notification, system status message, or other behaviour.
void
Deletes given Alert Definition from Adaptable State
Promise<void>
Displays the given Adaptable Alert.
void
Displays given Alert as a Toast
Updates given Alert Definition in Adaptable State
void
Evaluates the given Alert Definitions - will fire Alert if rule is met
Find all Alert Definitions which match the given criteria
Alert Definitions that are currently active (not suspended).
Retrieves alert definition by the technical ID (from AlertState)
AlertDefinition | undefined
Retrieves an Alert Definition by its Name
Retrieves all Alert Definitions in Alert State
'Normal' | 'Firing' | undefined
Current reading of a live Alert rule — one reading change history
(CHANGE_COUNT{[price], WITHIN(5m)} >= 3) or the clock. 'Firing' while
the rule holds for rowNode (per-row rules) or for the grid (grid-level
rules; rowNode ignored); 'Normal' otherwise. undefined for
non-live, suspended or never-evaluated definitions / rows.
Retrieves Alert section from Adaptable State
Alert Definitions that are currently suspended.
void
Opens the Settings Panel on the Alert page.
The Alert page has two tabs: 'Alerts' (the live / triggered alerts) and'Alert Definitions' (the alert configuration). Pass tab to open a specific tab.
When omitted, it opens the 'Alerts' tab if there are any live alerts, otherwise the'Alert Definitions' tab.
Promise<void>
Creates Alert based on given parameters and displays it.
Promise<void>
Creates an Adaptable Alert based on given parameters and displays it as Error Alert.
Promise<void>
Creates an Adaptable Alert based on given parameters and displays it as Info Alert.
Promise<void>
Creates an Adaptable Alert from the header and message and displays it as a Success alert.
Promise<void>
Creates an Adaptable Alert based on given parameters and displays it as Warning Alert.
Suspends Alert Definition
void
Suspends all Alert Definitions
Activates a suspended Alert Definition
void
Activates all suspended Alert Definition
Alert Fired Event
The Alert Fired Event is published by AdapTable whenever an Alert is fired.
The event comprises the AlertFiredInfo object which contains a single property:
AlertFiredInfo
Payload of the AlertFired event.
Fires when an Alert is displayed.
Extends , so adaptableApi is included.
Alert that was displayed.
A cell or row Alert includes the change that triggered it. A generic Alert is the message only.
Custom application Context provided in AdaptableOptions.adaptableContext
This is of type AdaptableAlert which has 2 flavours:
- Cell Changed Alert
- Row Changed Alert
Cell Changed Alert
This is fired when a Cell in AdapTable is changed — either manually or via ticking data.
It is of type AdaptableCellChangedAlert and contains a single cellDataChangedInfo property:
AdaptableCellChangedAlert
Defines an Alert fired by AdapTable when a cell is changed
AdaptableAlertBase<'cellChanged'>
Cell DataChange which triggered Alert
For a consolidated batch Alert this is the first affected cell (jump-to-cell lands here).
CellDataChangedInfo<TData>[]
All cell changes represented by this Alert when several changes from one batch
action were consolidated (occurrenceCount 1). The first entry matches
.
Used so cell / row highlighting still applies to every affected cell.
This property is of type CellDataChangedInfo and contains full details of the Cell Change:
CellDataChangedInfo
Defines a Cell Edit - includes full details of old and new values, the column and the enclosing Row
number
Timestamp of change occurrence (in milliseconds)
AdaptableColumn<TData>
Column in which cell is situated
any
Value after the change.
Absent when trigger is live.
any
Value before the change.
Absent when trigger is live.
boolean
Whether the change was prevented by a validation rule
Primary Key Column's value for the row where edited cell is situated
TData
Data in the Row
IRowNode<TData>
AG Grid RowNode that contains the cell
'edit' | 'tick' | 'undo' | 'aggChange' | 'calculatedColumnChange' | 'live'
What triggered the change - user, background change, a reverted change, a
derived update on a Calculated Column whose source value changed, or a
live Alert rule turning true for the row (live: no old / new value,column is the rule's first Scope column when it has one).
Row Changed Alert
This is fired when a Row in AdapTable has been added, updated or deleted.
It is of type AdaptableRowChangedAlert and contains a single rowDataChangedInfo property:
AdaptableRowChangedAlert
Defines an Alert fired by AdapTable when a row is changed
AdaptableAlertBase<'rowChanged'>
Row DataChange which triggered Alert
This property is of type RowDataChangedInfo and contains full details of the Row in question:
RowDataChangedInfo
Info for RowDataChangedEvent, which rows changed and why
rowTrigger is a RowDataChangeTrigger:
| Value |
|---|
'Add' |
'Update' |
'Delete' |
'Load' |
Event Subscription
Subscribing to the Event is done the same way as with all Adaptable Events:
api.eventApi.on('AlertFired', (eventInfo: AlertFiredInfo) => {
// do something with the info
});Find Out More
See Listening to Alerts for a worked example