ISDEFINED( ) function

Returns T (true) if the specified field or variable is defined, and F (false) otherwise.

Syntax

ISDEFINED(string)

Parameters

Name Type Description
string character

The name of the field or variable to check for the existence of. The value must be entered as a quoted string:

ISDEFINED("v_numeric_limit")

Output

Logical.

Examples

Basic examples

Returns T if v_numeric_limit is defined as a variable or field, otherwise returns F:

ISDEFINED("v_numeric_limit")

Advanced examples

Using ISDEFINED( ) to test a field

The following example uses the ISDEFINED( ) function to test if the Limit field is defined in the table before extracting records based on the value in the field:

OPEN Metaphor_Employees_US
IF ISDEFINED("Limit") EXTRACT RECORD IF Limit > 50000 TO "HighLimit.fil"