Frequently asked question

How can I order the fields returned from a spatial query?

Last Published: April 25, 2020

Answer

To order the fields differently than the default, or to return only a subset of the available fields, set the return fields list with the order of the desired fields.

v2006 and v2006.1 Spatial Query example:
returnFields = [NAME, CITY, STATE]

v2 Proximity/Query example:
returnFieldsList = [NAME, CITY, STATE]

Example result:
ESRI, Redlands, CA

Note:
Field names are case sensitive. Verify they match the format returned from the method getAvailableFieldNames.


Article ID:000006482

Software:
  • Legacy Products

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Discover more on this topic