Global Variables

Global Variables are used to globally define a variable that will store a value that is hardcoded or dynamic based. The value can later be retrieved and used in multiple places in Nectari (Filters, Column Heading, Selection Pages, etc.)

  • In the Administration section , click Global Variables in the left pane.

To create a new global variable:

  1. In the upper left hand corner, click Create New Global Variable.
    Note

    By default, the Type of global variable will be CONSTANT, you have the choice between CONSTANT (hardcoded value) and JAVASCRIPT (dynamic value).

  1. In both cases, enter a Key and a Description to identify your global variable.
  2. Select the proper Data Type for the value.
  3. When selecting JAVASCRIPT in the Type of the global variable drop-down list, the window layout will change to enter more information.

  4. Manually enter the script or use the JavaScript Builder to build the script.

  5. To test the script, click Evaluate Expression. It will execute the script and produce the results.

Example

The Global Variable can be used in the SQL Script Builder in the Data Model Designer for a Calculation.

Example

It can be also used in the translation as a Column Heading.