Search...
skip( )
Developer Preview
Sets the number of items to skip before returning query results.
Description
The skip()
function defines the number of results to skip before returning new query results.
For example, if you query a collection and 50 items match your query, but you set skip()
to 10
, the first 10 items that match are ignored, and the 11th through 50th items are returned.
Syntax
function skip(skip: number): FieldsQueryBuilder
skip Parameters
NAME
TYPE
DESCRIPTION
skip
Optional
number
Number of items to skip in the query results before returning the results.
Returns
Return Type:
Was this helpful?
Add a
skip
to a queryCopy Code
1const query = extendedFields.queryExtendedFields.skip(10);2
Create a query, add a
skip
, and run itCopy Code
1import { extendedFields } from 'wix-crm.v2';23export async function myQueryFunction() {4 const results = await extendedFields.queryExtendedFields().skip(10).find();56 if (results.items.length > 0) {7 const items = results.items;8 const firstItem = items[0];9 const pageSize = results.pageSize;10 const hasNext = results.hasNext();11 const hasPrev = results.hasPrev();12 const length = results.length;13 const query = results.query;1415 return items;16 } else {17 // Handle if no matching items found18 }19}20