getenv
getenv(name
)
The GETENV function has the following argument:
name
The name of the environment variable to be retrieved.
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.
Formula |
Description |
Example 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 |