Servigistics InService Customization > Search Customization > Search Customization > Search Criteria Configuration > SearchSortOrderParams
  
SearchSortOrderParams
The sort order parameters that are supported by Servigistics InService UI are configured in searchConfig.xml. The valid sort order types are rendered to UI using the REST endpoint /search/sortordertypes. The “key” attribute of SearchSortOrderParam provides the sort order identifier and the “labelKey” provides the label that needs to be displayed in UI. The “scePrimaryField” attribute provides the primary field that needs to be sorted and “sceSecondaryField” is defined if additional sorting needs to be supported apart from primary sorting. The value provided for scePrimaryField and sceSecondaryField should be of the format <FIELD>SPACE<SORT ORDER> where SORT ORDER is “asc” for ascending and “desc” for descending ex: TITLE asc. Different types of sorting can be configured hear which are rendered into the UI.
<SearchSortOrderParams>
<SearchSortOrderParam key="sortingordertitleasc"
labelKey="SORTINGORDERTITLE_ASC"
scePrimaryField="TITLE asc"
sceSecondaryField="" default="true" />
<SearchSortOrderParam key="sortingorderinfotypeasc"
labelKey="SORTINGORDER_INFOTYPE_ASC"
scePrimaryField="TYPERESULT asc"
sceSecondaryField="TITLE asc">
</SearchSortOrderParam>
</SearchSortOrderParams>
Customization
To add a new type of sort such as sorting based on ID the below entry can be added to the configuration. This is automatically rendered into the UI by REST endpoint /search/sortordertypes and available for the user to perform sorting as needed.
<SearchSortOrderParams>
<SearchSortOrderParam key="sortingordertitleasc"
labelKey="SORTINGORDERTITLE_ASC"
scePrimaryField="TITLE asc"
sceSecondaryField="" default="true" />

<SearchSortOrderParam key="sortingorderinfotypeasc"
labelKey="SORTINGORDER_INFOTYPE_ASC"
scePrimaryField="TYPERESULT asc"
sceSecondaryField="TITLE asc">
</SearchSortOrderParam>

<SearchSortOrderParam key="sortingorderideasc"
labelKey="SORTINGORDERID_ASC"
scePrimaryField="ID asc"
sceSecondaryField="" default="true" />
</SearchSortOrderParams>