Ns (Sort Key)

The Ns parameter sets the list of keys that will be used to sort records.

Parameter Ns
Name Sort Key
Java setter method ENEQuery.setNavActiveSortKeys()
.NET setter property ENEQuery.NavActiveSortKeys
Type
Ns=sort-key-names[(geocode)][|sort order][||…]
Description

Specifies a list of properties or dimensions (sort keys) by which to sort the records, and an optional list of directions in which to sort.

In other words, in order to sort records returned for a navigation query, you must append a sort key parameter (Ns) to the query, using the following syntax:
Ns=sort-key-names[(geocode)][|sort order][||…]

A sort key is a dimension or property name enabled for sorting on the data set. Optionally, each sort key can specify a sort order of 0 (ascending sort, the default) or 1 (descending sort). The records are sorted by the first sort key, with ties being resolved by the second sort key, whose ties are resolved by the third sort key, and so on.

Whether the values for the sort key are sorted alphabetically, numerically, or geospatially is specified in Developer Studio.

To sort records by their geocode property, add the optional geocode argument to the sort key parameter (noting that the sort key parameter must be a geocode property). Records are sorted by the distance from the geocode reference point to the geocode point indicated by the property key.

Sorting can only be performed when accompanying a navigation query. Therefore, the sort key (Ns) parameter must accompany a basic navigation value parameter (N).

Object Navigation
Dependency N

Examples

N=132831+154283&Ns=Price|1
N=0&Ns=Price
N=101&Ns=Price|1||Color
N=101&Ns=Price|1||Location(43,73)