QUERY Function
Summary
- The
QUERYExpression Function in AdaptableQL supports referencing Named Queries in Expressions
The QUERY Expression Function enables referencing Named Queries inside Expressions.
Note
A Named Query is a Boolean Expression that has been named and saved into Query State for subsequent re-use
The referenced Query is identified by its name and it is evaluated on the fly by AdapTableQL.
So the Expression below could be saved as a Named Query called 'Big Orders'
[ItemCount] > 30 OR [OrderCost] > 500And this Named Query can now be referenced as follows:
QUERY("Big Orders") AND [Currency] = 'USD'AdapTableQL: QUERY Expression Function
- This Example demonstrates how to use the
QUERYExpression Function - A Named Query is provided called 'Popular Frameworks' with the Expression:
[github_watchers] > 2000 OR [github_stars] > 14500 - This Named Query is then referenced in 3 places (using the
QUERYkeyword):- A Custom Report has the Expression:
QUERY("Popular Frameworks") - A Format Column Condition has the Expression:
QUERY("Popular Frameworks") AND [has_wiki] - A Row Change Alert has the Expression:
QUERY("Popular Frameworks") AND [language]="JavaScript"
- A Custom Report has the Expression:
Try It Out
- Edit the Named Query (through the Query Section in Settings Panel) and see how the Style changes
- Change Has Wiki in rows with JavaScript and see the Alert appear; do the same in rows with TypeScript and not there is no Alert
Find Out More
See Named Queries for more information and an accompanying demo