getCurrentIndex
Provides the index of the current record inside the data object.
A corresponding currentRow call returns the record at that index so you can inspect or update its fields.
A value of -1 indicates that the data object is editing a new row rather than an existing record. The row will be inserted into the database when endEdit or save is called.
Usage
const index = dsMyDataObject.getCurrentIndex();
if (index === -1) {
console.log('Editing a new row');
} else {
console.log('Editing row', index);
}API
getCurrentIndex(): number;Last updated
Was this helpful?