Name

getenv — Return the value of an environment variable.

Syntax

getenv(name)
              

The GETENV function has the following argument:

name

The name of the environment variable to be retrieved.

Description

This function look up and return an environment variable. If the environment variable does not exist then an error will be thrown.

There are three types of environment variables that may be retrieved:

env

Operating system environment variables.

report

Report writer parameters.

script

Global script variable.

Examples

Formula

Description

Result

getenv('env.USERNAME')Return the name of the current user.tmoore
getenv('report.scenario')Return the name of the current scenario (only valid in a report context).Scenario_1
getenv('script.periods')Return the number of planning periods.21