Configure sort order on hosted feature layer

577
3
05-03-2022 04:54 PM
Labels (2)
ZorbaConlen1
Occasional Contributor III

Hi. Does anyone know if it's possible to change the default sorting for features in a hosted feature layer? In my case, I need to sort by 2 fields, like Address and Date, say. This is for a feature layer hosted in AGOL. 

Thanks

0 Kudos
3 Replies
RussRoberts
Esri Notable Contributor

Is this for disapplying sort order?  The Map Viewer has this but is only available on one field. 

RussellRoberts1_0-1651670506691.png

 

ZorbaConlen1
Occasional Contributor III

Hi Russell

Good to know about the map viewer, but I really need to change the sort order of the raw data in the hosted layer. I'm consuming the layer in a non-esri app. The customer noticed that the data is not sorted in that app and asked if I can configure it to be sorted. That app lacks a capability for sorting as well.

Thanks for the reply. 

0 Kudos
RussRoberts
Esri Notable Contributor

Yup this isnt on the service level and is driven by the API https://developers.arcgis.com/javascript/latest/sample-code/layers-feature-sort-order/