Constrained_Clear

See Also: Clear, Constrain, Constrained_Find, Find

Purpose

To clear a table's record buffer so that records may be found.

The DataDictionary class provides superior functionality that replaces the need for this command.

Syntax

Constrained_Clear {mode} {table} by -1 | Recnum | {IndexNumber}

Where

What It Does

Constrained_Clear clears the record buffer and seeds the buffer with values appropriate for a subsequent Constrained_Find or Find command in the direction implied by an LT, LE, GE, or GT used in the command. It also establishes the table and index for subsequent Constrained_Find Next command.

Example

Constrained_Clear GE Tran_typ By 1

In this example, the record buffer of table tran_typ is cleared. A large negative number is moved into all numeric fields used in index 1 so that the next Find GE ... or Constrained_Find Next command will begin at the start of the index. The next Constrained_Find Next command would find the succeeding (GE) record.

Constrained_Clear LE Tran_typ By 1

In this example, the record buffer of table tran_typ is cleared. A large value is moved to all numeric fields used in index 1 so that the next Find LE ... or Constrained_Find Next command will begin at the end of the index. The next Constrained_Find Next command would find the preceding (LE) record.

Constrained_Clear is most frequently useful for situations where user input into a clear buffer is required for finding records.

The behavior of Constrained_Clear is independent of the constraint set in effect. If a constraint set specifies field values, Constrained_Clear may load the fields of the record buffer with initial values that are not within the constraints set. For this reason, a Constrained_Find First or Last command should be used before the Constrained_Find Next commands.