Search...
skip( )
Sets the number of items to skip before returning query results.
Description
The skip()
function defines the number of results to skip in the query
results before returning new query results.
For example, if you query your contacts and 50 items match your query, but
you set skip
to 10, the results returned will skip the first 10 items
that match and return the 11th through 50th items.
By default, skip
is set to 0.
Syntax
function skip(skip: string): ExtendedFieldsQueryBuilder
skip Parameters
NAME
TYPE
DESCRIPTION
skip
string
The number of items to skip in the query results before returning the results.
Returns
A ExtendedFieldsQueryBuilder
object that contains the refined query.
Return Type:
Was this helpful?
Add a skip to a query
Copy Code
1const query = contacts.queryExtendedFields().skip(10);
Create a query, add a skip, and run it
Copy Code
1import { Permissions, webMethod } from 'wix-web-module';2import { contacts } from 'wix-crm-backend';34export const myqueryExtendedFieldsFunction = webMethod(Permissions.Anyone, () => {56 return contacts.queryExtendedFields()7 .limit(10)8 .skip(10)9 .find()10 .then((results) => {11 if (results.items.length > 0) {12 const items = results.items;13 const firstItem = items[0];14 const pageSize = results.pageSize;15 const hasNext = results.hasNext();16 const hasPrev = results.hasPrev();17 const length = results.length;18 const query = results.query;1920 return items;21 } else {22 // Handle case where no matching items found23 }24 })25 .catch((error) => {26 console.error(error);27 })2829});