[Index]

Model: tool/Macro

Macro Evaluator

Full HTML Help

The Macro Evaluator is available to test a macro at a hierarchy level. Refer to the macro functions, syntax and examples in the documentation.

  1. Choose Administration Tools > Macro Evaluator to open the Macro Evaluator input form.

  2. From the drop-down list, choose the Context Hierarchy at which the macro is to be evaluated.

  3. Enter the macro text in the Macro input box.

    By default, a macro {# data.Countries.* | country_name:input.country #} is entered as a test macro to evaluate and Show Context is enabled to display the Context Data box for the input. parameter in the macro. Refer to the examples in the macro reference topics.

  4. Enable and provide values for Context Data and add data if required.

  5. Click Evaluate to run the query. The result of the evaluated macro is displayed in the Output box.

Additional utility controls available on the Macro Evaluator form:

Macro Evaluate Function

Full HTML Help

The tables below provide further examples.

Where self.x specifies an attribute of a model, with the value:

{# data.Countries.iso_country_code | country_name:'South Africa' #}
Example Output

Then:

{# fn.evaluate self.x #}
['ZAF']

Where MACRO1 is:

{{ data.Countries.emergency_access_prefix | iso_country_code:FRA }}

Where self.x is:

{# data.Countries.iso_country_code | emergency_access_prefix:macro.MACRO1 #}
Example Output

Then:

{# fn.evaluate self.x #}

Codes with same prefix as FRA:

['DNK','HKG',
 'FRA','DEU',
 'IND','ITA',
 'NLD','NZL',
 'SAU','ESP',
 'SWE','ZAF',
 'CHE','TUR']

Model Details: tool/Macro

Title Description Details