Order By Fields not working in ArcGIS Server 10.1.

3524
3
Jump to solution
09-22-2014 09:11 PM
MuditAgarwal
New Contributor III

Hello Everyone,

Does ArcGIS Server 10.1 supports Order By Fields on layer resource coming from FGDB ? We are working on Arcgis server 10.1 with QIP installed and data source is FGDB. Layer resource Supports Advanced Queries. I am writing ORDER BY clause like [fieldName ASC]. Order by on any field is not working. Any help appreciated.

Thanks

Mudit

0 Kudos
1 Solution

Accepted Solutions
MuditAgarwal
New Contributor III

Thanks Robert for quick reply. I am using ORDER BY in REST API interface available when you hit URL (http://ServerName/arcgis/rest/services/ServiceName/MapServer/layerIndex/query) in browser. I tried the way you described but no luck so I managed it by sorting the values in java script array after getting the result.

Thanks

Mudit

View solution in original post

0 Kudos
3 Replies
RobertScheitlin__GISP
MVP Emeritus

Mudit,

    Because you are using ArcGIS Server 10.1 you do have the ability to use the Order by Fields property. Here is an example of how it is used:

query.orderByFields = ["STATE_NAME DESC"];

Not sure how you are try to do this without seeing your code, but it sounds like you are trying to add a ORDER BY to your Where clause and this is not supported.

0 Kudos
MuditAgarwal
New Contributor III

Thanks Robert for quick reply. I am using ORDER BY in REST API interface available when you hit URL (http://ServerName/arcgis/rest/services/ServiceName/MapServer/layerIndex/query) in browser. I tried the way you described but no luck so I managed it by sorting the values in java script array after getting the result.

Thanks

Mudit

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Mudit,

   So you are saying that when you go to the RSET Service Directory page for your service you specify a field for the "Order By Fields:" item on the web form and it does not order the results? If this is truly the case then you should call tech support on this.

0 Kudos