Adds a sort to a query, sorting by the specified properties in descending order.
The descending()
function refines a LabelsQueryBuilder
to sort in ascending order of
the specified properties. If you specify more than one property,
descending()
sorts the results in descending order by each property in the
order they are listed.
You can sort the following types:
"abc"
comes after "XYZ"
.If a property contains a number as a String, that value will be sorted alphabetically and not numerically. Items that do not have a value for the specified sort property are ranked lowest.
function descending(propertyName: Array<string>): LabelsQueryBuilder;
The properties used in the sort.
Supported properties:
_createdDate
_updatedDate
displayName
const query = contacts.queryLabels().descending("_createdDate");
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.