English

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

Question

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

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.