Rows.rowRemove()
This article is about the rowRemove() function of the Rows object.
Rows.rowRemove()
Removes the rows in scope from the client browser only, without deleting them at the server. Use this function to remove/hide records from the client screen without having to check with the server whether this is possible or not.
Contrast with Rows.rowDelete(), which deletes records from the database.
Returns a UdbPromise object with the UdbDsc object as parameter.
Syntax
$.udb( *ds* ).rows( [rowRef1], [rowRef2] ).rowRemove( [options] )
.then( ( *dsc* ) => {
// success
})
.catch(() => {
// failure
})
.finally(() => {
// executed after success / failure is handled
});
$.udb( *ds* ).rowSet( *rowSet* ).rows( [rowRef1], [rowRef2] ).rowRemove( [options] )
.then( ( *dsc* ) => {
// success
})
.catch(() => {
// failure
})
.finally(() => {
// executed after success / failure is handled
});
*options* ::= {
[noselect]: *no-select*
}
*no-select* ::= { 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 removal. By default, the value is false.
Unlike rowDelete(), this is always performed without tracking an undoable manipulation.
Internally, rowRemove() reuses the exact same delete logic as rowDelete(), only with manipulation-tracking forced off. As a result, the rowpredelete/rowpostdelete events listed below are still triggered, exactly as they are for rowDelete().
Example
$.udb('EMP').rows({ EMPNO: 5 }).rowRemove();
Related events
| Event | Applies to | Occurs when |
|---|---|---|
| rowpredelete | Data source objects | Before a record is deleted |
| rowpostdelete | Data source objects | After a record is deleted |