Order of fields in mxd not the same as in REST

2344
3
06-28-2011 12:56 PM
MatthewLewin
New Contributor
If reorder the fields in a layer in an mxd and then publish to AGS, the order of the fields in the corresponding REST url are not the same...they seem to default to the order of the fields as defined by the underlying datasource (in this case SDE).  Is this known behaviour?  Is there any way to define the order of the fields in a layer in AGS?
0 Kudos
3 Replies
MartinErglis
New Contributor II
Have the same situation
0 Kudos
SrinivasVinnakota
Esri Contributor
This is a known behavior. Currently there is no way to specify the order of the fields returned by mapServer.
0 Kudos
RaviNarayanan
Esri Contributor
One option is to specify the order of fields in the outfields

for example:

ORDER OF FIELD: CNTY_FIPS,STATE_FIPS

http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/0/...

ORDER OF FIELD: STATE_FIPS,CNTY_FIPS
http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/0/...
0 Kudos