prev( )

Retrieves the previous page of reference query results.


The prev() function retrieves the previous page of reference query results.

The page size is 50 items. Navigate through pages of items with the prev() and next() functions.

If items are added or removed between calls to prev() the values returned may change.


function prev(): Promise<WixDataQueryReferencedResult>

prev Parameters

This function does not take any parameters.


Fulfilled - A query result object with the previous page of query results. Rejected - The errors that caused the rejection.

Return Type:

Was this helpful?

Get the previous page of a query result

Copy Code
2 .then((results) => {
3 let newResults = results;
4 let items = newResults.items;
5 let firstItem = items[0];
6 let totalCount = newResults.totalCount;
7 let hasNext = newResults.hasNext();
8 let hasPrev = newResults.hasPrev();
9 })
10 .catch((error) => {
11 let errorMsg = error.message;
12 let code = error.code;
13 });