BLANK Command

Example   See Also

Clears data from all fields in the current record when issued without additional arguments.

Syntax

BLANK
  [FIELDS FieldList]
  [Scope]
  [FOR lExpression1]
  [WHILE lExpression2]
  [NOOPTIMIZE]

Arguments

FIELDS FieldList

Clears only the fields you specify with FieldList. If you omit the FIELDS clause, all fields in a record are cleared by default. Any field you specify in an unselected work area must be prefaced with the alias of the work area.

Important   BLANK does not clear field data of a record in another related work area if the record pointer is at the end of the file in the current work area. The record pointer must be on a record in the current work area in order for BLANK to act on the fields in the related record.

Scope

Specifies a range of records to clear. Only the records that fall within the range are cleared. The scope clauses are: ALL, NEXT nRecords, RECORD nRecordNumber, and REST.

For more information on scope clauses, see Scope Clauses. Commands which include Scope operate only on the table in the active work area.

For more information on scope clauses, see the Overview of the Language online topic. Commands that include Scope operate only on the table in the active work area.

The default scope for BLANK is the current record (NEXT 1).

FOR lExpression1

Clears field data in records for which lExpression1 evaluates to true (.T.). Rushmore optimizes BLANK FOR if lExpression1 is an optimizable expression. A discussion of Rushmore optimization appears in "Understanding Rushmore Technology" in Chapter 15, Optimizing Applications, in the Programmer's Guide.

WHILE lExpression2

Specifies a condition whereby field data in records is cleared as long as the logical expression lExpression2 evaluates to true (.T.).

NOOPTIMIZE

Prevents Rushmore optimization of BLANK. For more information see SET OPTIMIZE and "Understanding Rushmore Technology" in Chapter 15, Optimizing Applications, in the Programmer's Guide.

Remarks

Use APPEND BLANK to add a new blank record to the end of a table. Use ISBLANK( ) to determine if a field in a record is blank.