Skip to main content

Clear Field

Syntax

Clear Field field_name

Parameters

  • field_name: The name of the database field to clear (e.g., Age, DNF).

Description

Clears the contents of a specified field for all entries in the database, or for a selected subset.

Remarks

This command replicates the F5 (clear field) functionality from the data entry screen. To clear the field for only specific entries, use a Select command before Clear Field. This method is faster and more efficient than using Selected with an empty Selected Message. It is often used inside a macro file (.rsm) to make it reusable.

Examples

A macro file (clear_f.rsm) to clear a field passed as a parameter (%1):

Clear Field %1

A main listing file (@clear_fields.lst) calling the macro to clear the Age and DNF fields:

clear_f.rsm Age
clear_f.rsm DNF

To clear a field for only selected records:

Select SEX
= M
Clear Field MyField