Clears the value of a single variable. Also clears all the filters that were set if the variable is a record and resets the key to the primary key.

CLEAR(Variable)

Parameters

Variable

Type: Any

The identifier (variable) of any C/AL data type, including simple and composite data types. The following rules apply when you run the CLEAR function:

  • A number variable is set to 0 (zero)

  • A string variable is set to empty string

  • A date variable is set to 0D (undefined date)

  • A time variable is set to 0T (undefined time)

  • A Boolean variable is set to FALSE

Expand imageRemarks

Expand imageExample

Expand imageSee Also