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 customQueryVariables property in Expression Options.

customQueryVariables

Default: null
Record<string, [return_value]>
Custom variables to be used in AdapTableQL
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

Expand to see how the VAR Expression Functions are Used

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