Skip to main content
Version: 11.2

Cols.clear()

note

This article is about the clear() function of the Cols object.

Cols.clear()

Clears the value of the columns in scope.

Returns a UdbCols object.

Syntax

$.udb( *ds* ).rows( *rowRef1*, [rowRef2] ).cols( [columns] ).clear( [quiet] )
$.udb( *ds* ).rowSet( *rowSet* ).rows( *rowRef1*, [rowRef2] ).cols( [columns] ).clear( [quiet] )

$.udb( *ds* ).searchCols( [columns] ).clear( [quiet] )

*quiet* ::= { true | [false] }

The required ds parameter is a data source selector.

The optional rowSet parameter is a rowset identifier. If the .rowSet() clause is omitted, then .rowSet('current') is assumed.

The required rowRef1, and optional rowRef2, are row selectors. Unlike the column meta-information functions, clearing an actual value requires a specific record to be identified.

The optional columns is a column selector. If omitted, all columns in scope are selected.

The optional quiet is a boolean that determines whether the cleared value is immediately propagated to all controls that may show it. The default is false, which means it is shown immediately.

Example

$.udb('EMP').rows('current').cols('EMPNO').clear();

Internally, clear() sets the value of the columns in scope to '', so it triggers the same events as .val() does when a value is specified.

EventApplies toOccurs when
rowpreupdateData source objectsBefore a record is updated
colpreupdateData source objectsBefore a value in a column is updated
colpostupdateData source objectsAfter a value in a record is updated
rowpostupdateData source objectsAfter a record is updated