View as Markdown

Summary

  • The VAR function in AdapTableQL enables developers to supply bespoke, custom values
  • These can then be referenced, and evaluated, in other Expressions

The VAR Expression Function allows developers to provide custom values which can be used in Expressions.

The return value of the VAR can be either

  • a 'hard-coded' value (string, number, boolean or Date)
  • a function that returns a value

The VAR values are provided at design-time via the queryVariables property in Expression Options.

queryVariables

Default: undefined
QueryVariable[]
Query Variables which can be referenced in Expressions via VAR
AdapTableQL: VAR Expression Function
Fork
  • This Example demonstrates how to use the VAR Expression Function
  • In Expression Options we define 3 VAR Expressions (all of which are then used in Adaptable Objects):
  • We have also created a Named Query called 'Good Performance' which uses the first 2 VAR Expressions
Try It Out
  • Change the Price for "Corolla" and note the Alert that fires
  • Select and run the "Good Performance" Query from the Grid Filter Toolbar and see both VAR Expressions be used
Loading demo…