Standard Expressions
Summary
- A Standard Expression is evaluated against each row in isolation and returns a single value
- The return value is either:
- any (scalar) — used in Calculated Columns
- boolean — the most common form, used in Alerts, Grid Filter, Format Columns and many other Modules
A Standard Expression is evaluated against each row in isolation and returns a single value.
The return value is one of:
- scalar (any data type) — the value for that row
- boolean —
truewhen the row passes every condition in the Expression
Standard Expressions are used in these Modules:
| Module | Usage | Type |
|---|---|---|
| Alerts | Triggers an Alert when data change matches a Rule | Boolean |
| Calculated Column | Evaluates the value displayed in the column | Scalar |
| Column Filter | Boolean operators (AdapTableQL Functions) or a full Expression | Boolean |
| Export | Custom Reports export only those rows returned by the Expression | Boolean |
| Flashing Cell | Relative Change rule on a cell update | Relative Change |
| Format Column | Sets whether or not to show the Format Column | Boolean |
| Grid Filter | Returns rows which match the true / false condition | Boolean |
| Named Query | A saved Standard Expression reused via QUERY | Any return type |
| Plus Minus | Manages evaluation of Custom Nudge Values | Boolean |
| Styled Column | Whether a Badge (or other style rule) renders | Boolean |
Find Out More
Relative Change Expressions are a specialist Standard form used in Alerts and Flashing Cell
Boolean Standard Expressions
Many Modules in AdapTable need true or false evaluation per row:
e.g. A Grid Filter that shows rows where the smaller of two bids is over 50, or the currency is Dollar:
MIN([BloombergBid], [MarkitBid]) > 50 OR [Currency] = 'USD'Or a Format Column condition for all positive columns in Scope:
IS_POSITIVE($SCOPE)Or an Alert Rule if you have 50 Open Issues in JavaScript rows:
[open_issues_count] > 50 AND [language] = "JavaScript"- This demo shows a number of different Standard Expressions:
- We have 4 Boolean Expressions applied to different AdapTable Modules:
- A Grid Filter is filtering the grid for rows where
Languageis JavaScript - The Export module contains an
MIT Reportthat exports rows whereLicenseis MIT License - A Format Column Condition is applied to rows where
Github Stars> 50,000 - An Alert fires when the Rule is triggered that
Open Issues> 50
- A Grid Filter is filtering the grid for rows where
- Additionally it contains a Scalar Expression applied to a Calculated Column -
Full Github- which addsGithub StarsandGithub Watchers
Scalar Standard Expressions
A Calculated Column evaluates a value for each row:
[github_stars] + [github_watchers]; CONCAT([currency], '-', [country]);[ShippedDate] > ADD_DAYS([OrderDate], 21) ? 'Delayed' : 'On time';A scalar Named Query can hold the same kind of Expression and be reused with QUERY.
Find Out More
See the Guide to Writing Expressions for columns, operators, shortcuts, AND / OR and WHERE