IsNull

Description

Reports whether the value of a variable or expression is null.

Syntax

IsNull ( any )

Argument

Description

any

A variable or expression that you want to test to determine whether its value is null

Returns

Boolean. Returns true if any is null and false if it is not.

Usage

Use IsNull to test whether a user-entered value or a value retrieved from the database is null. IsNull works for all datatypes but does not work for arrays.

If one or more columns in a DataWindow are required columns, that is, they must contain data, you do not want to update the database if the columns have null values. You can use FindRequired to find rows in which those columns have null values, instead of using IsNull to evaluate each row and column.

NoteSetting a variable to null To set a variable to null, use the SetNull function.

Examples

Example 1

These statements set lb_test to true:

integer a, b

boolean lb_test

SetNull(b)

lb_test = IsNull(a + b)

See also