[GIS] What are the requirements to set “Supports Advanced Queries” true on a Feature Layer hosted on ArcGis Server 10.1

arcgis-10.1arcgis-desktoparcgis-serverarcmapfeature-layer

I'm trying to use the ArcGIS query feature, OrderByFields, but I've read that for that feature to work the feature layer must show "Supports Advanced Queries: true". The layer we are hosting says that "Supports Advanced Queries: false", but I can't find any documentation that says what is required for this property to be true.

We are currently using ArcMap 10.1 with shape files to publish our service definition files, and we are hosting the map services on ArcGIS server 10.1

Best Answer

https://developers.arcgis.com/rest/services-reference/enterprise/layer-table.htm

supportsAdvancedQueries would return false in the following scenarios:

The layer / table resides in a workspace other than an enterprise database or File Geodatabase.

The layer / table is joined with another layer / table from a different workspace.

We put our shape files into a File Geodatabase, and we were able to get Supports Advanced Queries to show true, but we are still having issues with using OrderByFields, but that is a different question.