Named Query Technical Reference
Named Query State
NamedQueryState
Named Query section of Adaptable State, including Initial State.
Each query is a scalar AdapTableQL expression other expressions can call with QUERY('Name'). Aggregations are not allowed. ReturnType defaults to 'boolean', which can be used as a Grid Filter or Alert rule.
Named Queries other expressions can reference with QUERY('Name').
Named Query
NamedQuery
Defines a Query which can be referenced in AdaptableQL Expressions
string
Optional description of what the query computes;
shown in the Expression Editor lookups and Named Query views.
string
AdapTableQL Expression evaluated per row (scalar; aggregations are not allowed in Named Queries)
string
Name of the Query, used to reference it in AdaptableQL Expressions
Return type of the expression. When omitted, the query is treated as 'boolean' and can be used as a Grid Filter or Alert rule.
boolean
Sets Entity to ReadOnly (overwriting a Strategy Entitlement of 'Full')
ReturnType is a NamedQueryReturnType:
| Value |
|---|
'boolean' |
'number' |
'text' |
'date' |
'numberArray' |
'textArray' |
Note
- A Named Query's
Expressioncan resolve to any value (Boolean, number, text or date) - Only Named Queries which resolve to a Boolean can be loaded as a Grid Filter
- Scalar Named Queries can be referenced (via
QUERY) anywhere a value is expected - e.g. in Calculated Columns
Named Query API
NamedQueryApi
Named Queries saved in AdapTable State, and running a query by object or by name.
void
Adds several Named Queries to Adaptable State.
void
Adds a new Named Query to Adaptable State
Gets all Named Queries in Adaptable State
NamedQuery | undefined
Retrieves Named Query with given name from State
Retrieves Query section from Adaptable State
NamedQueryValidationResult
Whether this Named Query can be saved. The name is required and must not already be used.
void
Opens Settings Panel with Query section selected and visible
void
Runs the given Named Query
void
Runs Named Query which has given name