FORMULA LANGUAGE


@Environment
Example

Sets or returns an environment variable stored in a formula.

Syntax

@Environment( variable )
@Environment(
variable ; value )

Parameters

variable


value Return value

environmentVariable


Usage

Use @Environment when you want to set an environment variable within a formula. If it's to be nested within another @function (such as @If or @Do), use @SetEnvironment instead.

The ENVIRONMENT keyword works the same as @Environment.

@Environment cannot be used in column or selection formulas; it's only intended for use in field formulas, toolbar buttons, and agents. Some formulas, such as scheduled agents, are run on the server instead of on the user's workstation. In this case, the environment variables affected are the server environment variables, not the workstation variables. You can use a computed text formula to retrieve variables, but not to set variables.

You can also use @Environment to get the value of an environment variable stored the user's notes.ini file (Windows, OS/2, and UNIX) or Notes Preferences file (Macintosh). You can only set and retrieve the values of variables that begin with a dollar sign ($) symbol. Do not include the dollar sign in the variable parameter. For instance, to change the value of the $EnableAlarms INI variable from 1 to 0, enter:

@Environment("EnableAlarms";"0")

For Web applications, use predefined field names to gather information about the Web user's environment by requesting Common Gateway Interface (CGI) environment variables.

Language cross-reference

Environ function of LotusScript language

GetEnvironmentString method of LotusScript NotesSession class

SetEnvironmentVar method of LotusScript NotesSession class

getEnvironmentString method of Java Session class

setEnvironmentVar method of Java Session class

Example
See Also