Skip to main content
Version: 11.2

Rows.rowDelete()

note

This article is about the rowDelete() function of the Rows object.

Rows.rowDelete()

Deletes the rows in scope from the database.

tip

Contrast with Rows.rowRemove(), which removes rows only from the client browser.

Returns a UdbPromise object with the UdbDsc object as parameter.

Syntax

$.udb( *ds* ).rows( [rowRef1], [rowRef2] ).rowDelete( [options] )
.then( ( *dsc* ) => {
// success
})
.catch(() => {
// failure
})
.finally(() => {
// executed after success / failure is handled
});
$.udb( *ds* ).rowSet( *rowSet* ).rows( [rowRef1], [rowRef2] ).rowDelete( [options] )
.then( ( *dsc* ) => {
// success
})
.catch(() => {
// failure
})
.finally(() => {
// executed after success / failure is handled
});

*options* ::= {
[noselect]: *no-select*,
[noManip]: *no-manip*
}

*no-select* ::= { true | [false] }
*no-manip* ::= { 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 optional rowRef1, rowRef2 are row selectors. If omitted, all records in scope are addressed.

Options is a struct that can have the following items, all of which are optional.

No-select is used when a record must not be selected automatically after the delete. By default, the value is false.

No-manip determines whether the delete is tracked as an undoable manipulation. By default, the value is false, unless the data source is of type 'Variable', in which case it is always treated as true.

To consult (and possibly cancel) before the delete takes place, use the rowpredelete event listed below, rather than a callback option.

Example

$.udb('EMP').rows({ EMPNO: 5 }).rowDelete();
EventApplies toOccurs when
rowpredeleteData source objectsBefore a record is deleted
rowpostdeleteData source objectsAfter a record is deleted