IsEmpty

Returns 1 (true) if a field is empty or if other errors occur; otherwise, returns 0 (false).

Format 

IsEmpty ( field )

Parameters 

field - any field name, text expression, or numeric expression

Data type returned 

number

Originated in version 

6.0 or earlier

Description 

This function returns 1 (true) if a field is empty, if a related field, a related table, relationship, or a file is missing, or if another error occurs; otherwise, 0 (false).

For container fields, this function returns 0 (false) if the field contains a file. To determine whether a file in a container field is empty, use the GetContainerAttribute function.

Example 1 

IsEmpty ( OrderNum ) returns 1 if the OrderNum field is empty.

Example 2 

If ( IsEmpty ( LastName ) ; "Invalid record" ; "" ) displays Invalid Record if the LastName field is blank, but displays nothing if there is an entry in LastName.

Example 3 

IsEmpty ( Payments::DatePaid ) returns 1 if, for example, the Payments table has been moved or renamed.

Example 4 

IsEmpty ( "text" ) returns 0.