Lotus Software logo
IBM Lotus Domino Designer 8.5
  Versions 8.5 and 8.5.1






@Environment

Sets or returns an environment variable stored in a formula.

Syntax

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

Parameters

variable

Text or text list. The name of the environment variable you want to retrieve. To retrieve multiple environment variables, use a text list.

value

Text. Optional. The value you want to assign to the environment variable. Since users have their own notes.ini or Notes Preferences file, this value can be customized for each user. Omit this parameter if you just want to retrieve the value, not set it.

Return value

environmentVariable

Text. The value of the environment variable you specified. To use the return value in arithmetic operations, use @TextToNumber to convert it to a number.

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

See examples

Examples: @Environment, @SetEnvironment, and ENVIRONMENT
Related topics
Getting and setting environment variables
ENVIRONMENT
@SetEnvironment
@Functions with ECL security




Library | Support | Terms of use |

Last updated: Monday, October 5, 2009