next( )


Retrieves the next page of reference query results.

The next() function retrieves the next 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 next() the values returned may change.

Method Declaration
Copy
function next(): Promise<WixDataQueryReferencedResult>;
Request
This method does not take any parameters
Returns
Return Type:Promise<WixDataQueryReferencedResult>
JavaScript
oldResults .next() .then((results) => { let newResults = results; let items = newResults.items; let firstItem = items[0]; let totalCount = newResults.totalCount; let hasNext = newResults.hasNext(); let hasPrev = newResults.hasPrev(); }) .catch((error) => { let errorMsg = error.message; let code = error.code; });
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?