Siebel eScript Language Reference > Methods Reference > Data Querying Methods >

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)

Table 101 describes the arguments for the Is Defined method.

Table 101. 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");

Related Topics

For more information, see Undefine Method.

Siebel eScript Language Reference Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Legal Notices.