clear field


The clear field statement clears one or more fields.


clear field field_name{, field_name, field_name, ...}


field_name The name of the field to be cleared. To clear multiple fields, list the name of each field separated by a comma.


Clearing a field removes the data currently in the field. Because fields to be cleared can be located in different tables or windows, be sure to fully qualify the fields as needed.

When a list field (list box, multi-select list box, combo box, drop-down list, button drop list or visual switch) is cleared, all of the static values currently displayed in the field are removed. This includes the values defined for the list’s data type. To redisplay these values, close the window, then reopen it. This will not redisplay items added to the list using the add item statement, unless those items were added in the window pre script, which will run when the window is reopened.

When a composite field is cleared, the individual components of the composite are cleared.

If a table is not open when a field in that table is cleared, the clear field statement will open the table.

Documentation Feedback