Back to Geneos FAQ

Variable Scoping and Resolution

Variables can be set in any of the following places within the Gateway Setup Editor:

This can get tricky when the same variable name is defined in multiple places and holds different values. To help figure out which value the variable is resolved to, we rely on the following Variable Scoping Rules:

Examples and scenarios Copied

To help better understand variable scoping rules, we will be using the below toolkit dataview that will echo out the following table. Notice the “Variable value” column is currently blank for the variable name “variableReso”.

7638700296221 mceclip0

The following rule will be used to set the resolved variable value for “variableReso”.

7638753229341 mceclip2

The below scenarios have “variableReso” defined in multiple places throughout the setup. Using variable scoping rules will help determine which value the variable resolves to.

The configuration files for these examples can be found in the bottom of the page.

Scenario 01 Copied

Scenario 02 Copied

Scenario 03 Copied

Scenario 04 Copied

Scenario 05 Copied

Scenario 06 Copied

Scenario 07 Copied

Scenario 08 Copied

Scenario 09 Copied

["Geneos"] ["Geneos > Gateway"] ["FAQ"]

Was this topic helpful?