Creates a query to retrieve a list of events.
The queryEvents() function builds a query to retrieve a list of events and returns an EventsQueryBuilder object.
The returned object contains the query definition, which is typically used to run the query using the find() function.
You can refine the query by chaining EventsQueryBuilder functions onto the query. EventsQueryBuilder functions enable you to sort, filter, and control the results that queryEvents() returns.
queryEvents() runs with the following EventsQueryBuilder default that you can override:
limit is 50.event.start in ascending order.The functions that are chained to queryEvents() are applied in the order they are called.
The following EventsQueryBuilder functions are supported for the queryEvents() function. For a full description of the events object, see the object returned for the items property in EventsQueryResult.
| PROPERTY | SUPPORTED FILTERS & SORTING |
|---|---|
scheduleId | eq(),in() |
externalScheduleId | eq(),in() |
type | eq(),in() |
recurringEventId | eq(),in() |
transparency | eq() |
location | exists() |
location.id | eq(),in() |
location.type | eq(),in() |
resources.id | hasSome(),hasAll() |
resources.type | hasSome(),hasAll() |
resources.transparency | hasSome(),hasAll() |
totalCapacity | eq(),ne(),gt(),ge(),lt(),le(),exists() |
remainingCapacity | eq(),ne(),gt(),ge(),lt(),le() |
participants.total | eq(),ne(),gt(),ge(),lt(),le() |
conferencingDetails | exists() |
appId | eq(),in() |
This method doesn't return any custom errors, but may return standard errors. Learn more about standard Wix errors.