System Predicates
Summary
- AdapTable supplies a large number of System Predicates
- System Predicates are small boolean functions evaluated by AdapTable
- They are primarily used in Filters but can also be used in Alerts, Flashing Cells and Format Column Modules
AdapTable provides a large number of Predicates available for both developers and end users.
Hint
- Additionally, developers can provide Custom Predicate Definitions to supplement System Predicates
- Alternatively they can be used to override the default System Predicates behaviour with custom behavior
These are all different instances of the AdaptablePredicate object, which comprises a number of properties which allow AdapTable to know where, how and when to display it.
Deep Dive
Anatomy of a System Predicate
Managing System Predicates
By default all System Predicates are available in Modules to which they have the correct Scope.
Note
The Appendix below lists which System Predicates are available by default to each Module
However developers are able to list / manage which System Predicates are present in AdapTable if required.
This is done via 5 properties in Predicate Options:
| Type | Predicates Returned | Where Available |
|---|---|---|
systemFilterPredicates | SystemFilterPredicateIds | Column Filters |
systemFormatColumnPredicates | SystemFormatColumnPredicateIds | Format Column Conditions |
systemAlertPredicates | SystemAlertPredicateIds | Alerts |
systemFlashingCellPredicates | SystemFlashingCellPredicateIds | Flashing Cells |
systemBadgeStylePredicates | SystemBadgeStylePredicateIds | Badge Styles |
Deep Dive
Using the System Predicate properties
Appendix: System Predicate List
This is the full list of Predicates shipped by AdapTable together with where they can be applied:
| Predicate | Column Data Type | No.of Inputs | Column Filters | Alerts | Flashing Cells | Format Column | Badge Style |
|---|---|---|---|---|---|---|---|
Blanks | All | 0 | ✅ | ✅ | ✅ | ✅ | ✅ |
NonBlanks | All | 0 | ✅ | ✅ | ✅ | ✅ | ✅ |
In | All | n | ✅ | ✅ | ✅ | ✅ | ✅ |
NotIn | All | n | ✅ | ✅ | ✅ | ✅ | ✅ |
Equals | number | 1 | ✅ | ✅ | ✅ | ✅ | ✅ |
NotEquals | number | 1 | ✅ | ✅ | ✅ | ✅ | ✅ |
GreaterThan | number | 1 | ✅ | ✅ | ✅ | ✅ | ✅ |
LessThan | number | 1 | ✅ | ✅ | ✅ | ✅ | ✅ |
Positive | number | 0 | ✅ | ✅ | ✅ | ✅ | ✅ |
Negative | number | 0 | ✅ | ✅ | ✅ | ✅ | ✅ |
Zero | number | 0 | ✅ | ✅ | ✅ | ✅ | ✅ |
Between | number | 2 | ✅ | ✅ | ✅ | ✅ | ✅ |
NotBetween | number | 2 | ✅ | ✅ | ✅ | ✅ | ✅ |
Is | text | 1 | ✅ | ✅ | ✅ | ✅ | ✅ |
IsNot | text | 1 | ✅ | ✅ | ✅ | ✅ | ✅ |
Contains | text | 1 | ✅ | ✅ | ✅ | ✅ | ✅ |
NotContains | text | 1 | ✅ | ✅ | ✅ | ✅ | ✅ |
StartsWith | text | 1 | ✅ | ✅ | ✅ | ✅ | ✅ |
EndsWith | text | 1 | ✅ | ✅ | ✅ | ✅ | ✅ |
Regex | text | 1 | ✅ | ✅ | ✅ | ✅ | ✅ |
Today | date | 0 | ✅ | ✅ | ✅ | ✅ | ❌ |
Yesterday | date | 0 | ✅ | ✅ | ✅ | ✅ | ❌ |
Tomorrow | date | 0 | ✅ | ✅ | ✅ | ✅ | ❌ |
ThisWeek | date | 0 | ✅ | ✅ | ✅ | ✅ | ❌ |
ThisMonth | date | 0 | ✅ | ✅ | ✅ | ✅ | ❌ |
ThisQuarter | date | 0 | ✅ | ✅ | ✅ | ✅ | ❌ |
ThisYear | date | 0 | ✅ | ✅ | ✅ | ✅ | ❌ |
InPast | date | 0 | ✅ | ✅ | ✅ | ✅ | ❌ |
InFuture | date | 0 | ✅ | ✅ | ✅ | ✅ | ❌ |
Before | date | 1 | ✅ | ✅ | ✅ | ✅ | ❌ |
After | date | 1 | ✅ | ✅ | ✅ | ✅ | ❌ |
On | date | 1 | ✅ | ✅ | ✅ | ✅ | ❌ |
NotOn | date | 1 | ✅ | ✅ | ✅ | ✅ | ❌ |
NextWorkDay | date | 0 | ✅ | ✅ | ✅ | ✅ | ❌ |
LastWorkDay | date | 0 | ✅ | ✅ | ✅ | ✅ | ❌ |
WorkDay | date | 0 | ✅ | ✅ | ✅ | ✅ | ❌ |
Holiday | date | 0 | ✅ | ✅ | ✅ | ✅ | ❌ |
Range | date | 2 | ✅ | ❌ | ❌ | ❌ | ❌ |
True | boolean | 0 | ✅ | ✅ | ✅ | ✅ | ❌ |
False | boolean | 0 | ✅ | ✅ | ✅ | ✅ | ❌ |
AnyChange | All | 0 | ❌ | ✅ | ✅ | ❌ | ❌ |
PercentChange | number | 0 | ❌ | ✅ | ✅ | ❌ | ❌ |