Skip to main content
Version: 11.2

Rowset.setBusy()

note

This article is about the setBusy() function of the Rowset object.

Rowset.setBusy()​

Sets the busy status of the row set. This can, for example, be used to prevent two operations from being executed simultaneously on the same row set.

Returns a boolean: the resulting busy status of the row set.

Syntax​

$.udb( *ds* ).rowSet( *rowSet* ).setBusy( *value* )

The required ds parameter is a data source selector.

The required rowSet parameter is a rowset identifier.

The required value is a boolean that sets the busy status of the row set.

Example​

// prevent two fast, consecutive deletes on the same record from being handled simultaneously
let rowSet = $.udb('EMP').rowSet('current');

if (!rowSet.busy()) {
rowSet.setBusy(true);
rowSet.rows('current').rowDelete().finally(() => {
rowSet.setBusy(false);
});
}