remove( )

Removes the current item.

The remove() function returns a Promise that is resolved when:

  • The current item is deleted in the collection.
  • Any connected page elements have been updated with the next item’s values if there is a next item, or the previous item's values if the removed item was the last item.

Calling remove() on a write-only or read-only dataset causes an error.


A dataset needs to load its data before you call its remove() function. Usually a dataset finishes loading a short time after the page it is on finishes loading. So if you call remove() inside the page’s onReady() event handler, the dataset might not be ready yet.

To call remove() as soon as possible after a page loads, use the dataset's onReady() function inside the page’s onReady() event handler to ensure that both the page and the dataset have finished loading.

Method Declaration
This method does not take any parameters
Was this helpful?