EVAL (Macros)

You can write and include macros in your queries. This means you can embed expressions that are parameterized to generate BQL.

You can use macros in expression fields, such as the Expression field in the Column Properties dialog in Designer.

The macro is executed when the query is constructed, not after the result set has been returned.

Important: Macros are not supported for saved expressions that are in the Subject Area of Designer or Visualizer.

EVAL Syntax for Macros

The syntax for macros is:

<EVAL!Expression!>

Example EVAL Syntax for a Designer Column Properties Expression

Macros can be used in conjunction with dashboard prompts, for example, with GETPROMPTVALUE. For example, determine which version of Quantity to use based on a user-selected prompt answer. If the List prompt brings back “shipped” it will show [ShippedDate: Sum: Quantity] otherwise it will show [OrderDate: Sum: Quantity].

([<EVAL!IIF((GetPromptValue('Requested View','shipped')='ordered'),'OrderDate: ','ShippedDate: ')!>Sum: Quantity])

 

For this example, you would set up the following prompt properties.

This is how the prompt would display on an original Dashboard.

 

See Also
Defining Expressions in Designer
Setting up Dashboard Prompts in Original Dashboards