Global Variables

A Global Variable is an object that variablizes an otherwise static input parameter. For example, you could use one Global Variable in place of a file path in multiple objects. Using a Global Variable instead of a path lightens the workload when/if a location changes.

A Global Variable can represent a:
  • File
  • File path
  • URL path
  • System property
  • Email address
  • Host name
  • Part of a path

Global Variables can be used as parameters in four objects: File Monitor, File Adapter, FTP Adapter, and Data Source.

They are exceptionally useful for unexpected changes. If you have to move all your files or architecture to a different folder or different machine, it's far more efficient to change a few Global Variables as opposed to a hundred individual files or URL paths.

If they can be used across multiple projects, Cleo recommends creating Global Variables in a CORE Project, so the object can easily be shared with other Projects. This is useful for multiple Projects that refer to the same folder or database, an administrator email address, etc.

A Global Variable can contain another Global Variable.

Business Use

It is a best practice to use Global Variables instead of specific paths when multiple objects refer to the same path, just in case you must move things later on. This also has an immediate, practical use with testing.

For example, suppose you have test server C: and production server D:. When testing, all your path parameters point to C:. When you move to production, you would have to go into the objects that refer to C: and change each parameter to D:. However, if you refer all those objects to a single Global Variable, you only need to change the path to D: on a single Global Variable.

A Global Variable can also represent a portion of a path name.
For example, you could set up a Global Variable, <Desktop.globalVar> and then abbreviate this path:
  • C:\Users\ExtolUser\Desktop\FFfolder
As this:
  • <Desktop>FFfolder

How the Object Works

Global Variables can also be used to define other Global Variables.

They are tracked in Admin Console | Settings.

If you want to use a Global Variable from one Project in another Project, you must enable sharing between those Projects.