Data Change Alerts
Summary
- The most common type of Alerts in AdapTable are those which fire as the result of a Data Change rule
- This Data Change rule can be one of 2 types:
- A Predicate - fires when the cell change matches the predicate
- A Boolean Expression - allows for multiple cell values to be included in the evaluation
Data Change Alerts are the most common type of Alert in AdapTable.
They fire whenever a change in the Grid's data matches the Rule in the Alert Definition.
Note
This change can be either the result of a user's edit or of ticking data
The Rule can be one of two types:
Predicate
Predicates are used for more "simple" Data Change based Alert rules.
Note
A Predicate is a boolean function used in many places in AdapTable (e.g. Column Filters)
Predicates have a type (e.g. GreaterThan, Positive) and optional inputs if required (e.g. 100).
Find Out More
See the System Predicate Guide for a list of all the System Predicates available for Alerts
The Alert fires if the Data Change matches that defined in the Predicate.
- This Demo contains 4 Alerts that each uses a Predicate-based Rule for reacting to Data Changes:
LessThanPredicate (on the GitHub Stars Column) - the Alert fires if the value is less than1000GreaterThanPredicate (on the Open Issues Column) - the Alert fires if the value is greater than500BlankPredicate (on all String Columns) - the Alert fires if the new cell value in any string Column is emptyIsPredicate (on the Name Column) - the Alert fires if theNameis changed to "Python"
- Each Alert will display a Notification and has a Behaviour of highlighting the cell
Expand to see the Predicate Definitions
- Trigger Alerts by:
- Editing a cell in the GitHub Stars Column to a value
<1000 - Editing a cell in the Open Issues Column to a value
>500 - Changing a value in Language, Name or Description Columns to a blank value
- Changing a value in the Name Column to "Python"
- Editing a cell in the GitHub Stars Column to a value
Multiple Predicates
Prior to Version 14 only a single Predicate could be supplied for each Data Change Alert.
There is now no limit on how many Predicates can be provided in each Alert Rule.
This allows for a more powerful and flexibile rules to be set.
Hint
It allows users to use Predicates in preference to more complicated (and sometimes off-putting) Expressions
- This Demo contains 2 Alerts that each contain Multiple Predicates in the Rule which reacts to Data Changes:
- GitHub Stars Column - Alert fires if new value matches Predicates
GreaterThan100 andLessThan1000 - Name Column - Alert fires if new value matches Predicates
StartsWith'A' andEndsWith'Z'
- GitHub Stars Column - Alert fires if new value matches Predicates
- Each Alert will display a Notification and has a Behaviour of highlighting the cell
- Trigger Alerts by:
- Editing a cell in the GitHub Stars Column between 100 and 1000
- Changing a cell in Name Column to a new value which starts with 'A' and ends with 'Z'
Boolean Expression
For more advanced scenarios, Alerts can be triggered as the result of a Standard Expression.
AdapTabble will use AdapTableQL - its native Query Language - to evaluate the Expression.
Note
This enables Alerts which will fire based not just on data changes in the changed cell, but other values in the row
If all (the potentially complex) conditions return true, the Alert will fire.
- This example fires a
SuccessAlert when as a result of data changes in the row,Github Starshas an even number and theLanguageis TypeScript - The Boolean Expression provided is
[github_stars] % 2 = 0 AND [language] = "TypeScript"
- Edit the GitHub Stars in a row where
language=TypeScriptto be an even number - Edit any cell in a row where
language=TypeScriptand an even number of GitHub Stars
Find Out More
The AdapTableQL Guide provides full details on writing Boolean Expressions