Is Defined Method
The Is Defined method tests if a variable or object property is defined. It returns one of the following values:
The item is defined. It returns the following value:
True
The item is not defined. It returns the following value:
False
This method is unique to Siebel eScript. For more information, see Make Sure the JavaScript Interpreter Can Run a Function.
Format
defined(var)
The following table describes the arguments for the Is Defined method.
Argument | Description |
---|---|
var |
The variable or object property you must query. |
Example
The following example includes two uses of the Is Defined method. The first use examines a variable named t. The second use examines an object named t.t:
var t = 1;
if (defined(t))
TheApplication().Trace("t is defined");
else
TheApplication().Trace("t is not defined");
if (!defined(t.t))
TheApplication().Trace("t.t is not defined"):
else
TheApplication().Trace("t.t is defined");
For more information, see Undefine Method.