[Index]

Model: tool/Macro

Macro Evaluator

Full HTML Help

Tip

Use the Action search to navigate Automate

Overview

Automate provides a macro evaluator for testing macros at a hierarchy level. Refer to the macro functions, syntax and examples in the documentation.

On the Macro Evaluator page you can evaluate a macro, and also:

Evaluate a macro

  1. In the Admin Portal, go to Macro Evaluator.

  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.

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