# RuleBasedAlertDefinition

Canonical page: https://www.adaptabletools.com/docs/reference/rulebasedalertdefinition

Alert that fires when data matches a rule in the given column scope

```ts title="TypeScript"
export interface RuleBasedAlertDefinition extends AlertDefinitionBase 
```

###### Extends

[`AlertDefinitionBase`](https://www.adaptabletools.com/docs/reference/alertdefinitionbase.md)

## Properties

| Property | Type | Description |
| --- | --- | --- |
| [AlertForm](https://www.adaptabletools.com/docs/reference/rulebasedalertdefinition.md#alertform) | `string \| `[`AlertButtonForm`](https://www.adaptabletools.com/docs/reference/alertbuttonform.md) | Form to display in Alert with buttons and inputs |
| [AlertProperties](https://www.adaptabletools.com/docs/reference/rulebasedalertdefinition.md#alertproperties) | [`RuleAlertProperties`](https://www.adaptabletools.com/docs/reference/rulealertproperties.md) | Properties which set what happens when the Alert is triggered (notification and grid behaviours) |
| [Rule](https://www.adaptabletools.com/docs/reference/rulebasedalertdefinition.md#rule) | `string` | AdapTableQL boolean expression deciding when the Alert is triggered.<br/><br/>The kind is inferred from the text: a per-row rule such as<br/>`[price] > 100`, an aggregated rule such as `SUM{[notional]} > 1000000`,<br/>or a live (observable) rule such as `CHANGE_COUNT{[price], WITHIN(5m)} >= 3`. |
| [Scope](https://www.adaptabletools.com/docs/reference/rulebasedalertdefinition.md#scope) | [`ColumnScope`](https://www.adaptabletools.com/docs/reference/columnscope.md) | Where Alert can be triggered: one, some or all columns or DataTypes |
| [TriggerPolicy](https://www.adaptabletools.com/docs/reference/rulebasedalertdefinition.md#triggerpolicy) | [`AlertTriggerPolicy`](https://www.adaptabletools.com/docs/reference/alerttriggerpolicy.md) | When a live rule (one reading change history — CHANGE_COUNT[price],<br/>WITHIN(5m) = 3 — or the clock) fires. Live rules are re-evaluated on<br/>data changes and on window expiry alike, and fire only on the transition<br/>from false to true (per row, or once for a grid-level rule). Ignored for<br/>every other rule. |
| [IsReadOnly](https://www.adaptabletools.com/docs/reference/rulebasedalertdefinition.md#isreadonly) | `boolean` | Sets Entity to ReadOnly (overwriting a Strategy Entitlement of &#39;Full&#39;) |
| [IsSuspended](https://www.adaptabletools.com/docs/reference/rulebasedalertdefinition.md#issuspended) | `boolean` | Suspends (i.e. turns off) an Adaptable Object |

## Property Details

### AlertForm

Form to display in Alert with buttons and inputs

```ts title="TypeScript"
AlertForm?: string | AlertButtonForm;
```

###### Property Value

`string | `[`AlertButtonForm`](https://www.adaptabletools.com/docs/reference/alertbuttonform.md)

### AlertProperties

Properties which set what happens when the Alert is triggered (notification and grid behaviours)

```ts title="TypeScript"
AlertProperties?: RuleAlertProperties;
```

###### Property Value

[`RuleAlertProperties`](https://www.adaptabletools.com/docs/reference/rulealertproperties.md)

### Rule

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`.

```ts title="TypeScript"
Rule: string;
```

###### Property Value

`string`

### Scope

Where Alert can be triggered: one, some or all columns or DataTypes

```ts title="TypeScript"
Scope: ColumnScope;
```

###### Property Value

[`ColumnScope`](https://www.adaptabletools.com/docs/reference/columnscope.md)

### TriggerPolicy

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.

```ts title="TypeScript"
TriggerPolicy?: AlertTriggerPolicy;
```

###### Property Value

[`AlertTriggerPolicy`](https://www.adaptabletools.com/docs/reference/alerttriggerpolicy.md)

### IsSuspended

> *Inherited from [SuspendableObject](https://www.adaptabletools.com/docs/reference/suspendableobject.md)*

Suspends (i.e. turns off) an Adaptable Object

```ts title="TypeScript"
IsSuspended?: boolean;
```

###### Property Value

`boolean`

### IsReadOnly

> *Inherited from [AdaptableObject](https://www.adaptabletools.com/docs/reference/adaptableobject.md)*

Sets Entity to ReadOnly (overwriting a Strategy Entitlement of &#39;Full&#39;)

```ts title="TypeScript"
IsReadOnly?: boolean;
```

###### Property Value

`boolean`
