getItems( )


Returns the selected items.

The getItems() function returns a Promise that is resolved to a GetItemsResult object when the items have been retrieved.

Calling getItems() on a write-only dataset causes an error.

Note:

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

To call getItems() 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
Copy
Method Parameters
fromIndexnumberRequired

The index of the first item to return.


numberOfItemsnumberRequired

The number of items to return.

Returns
Return Type:Promise<GetItemsResult>
Was this helpful?
Yes
No