queryStaffMembers( )


Creates a query to retrieve a list of staff members.

The queryStaffMembers() method builds a query to retrieve a list of staff members and returns an StaffMembersQueryBuilder object.

The returned object contains the query definition, which is typically used to run the query using the find() method.

You can refine the query by chaining StaffMembersQueryBuilder methods onto the query. StaffMembersQueryBuilder methods enable you to sort, filter, and control the results queryStaffMembers() returns.

queryStaffMembers() runs with these StaffMembersQueryBuilder defaults, which you can override:

  • limit(50)
  • descending("_createdDate")

The methods that are chained to queryStaffMembers() are applied in the order they're called. For example, if you apply ascending('createdDate') and then descending('id'), the results are sorted first by the created date, and then, if there are multiple results with the same date, the items are sorted by ID.

PROPERTYSUPPORTED FILTERS & SORTING
_ideq(),in(),ne(),ascending(),descending()
_createdDateeq(),ne(),lt(),le(),gt(),ge(),in(),exists(),ascending(),descending()
_updatedDateeq(),ne(),lt(),le(),gt(),ge(),in(),exists(),ascending(),descending()
Method Declaration
Copy
Method Parameters
optionsQueryStaffMembersOptions
Returns
Errors

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

Did this help?