PROBLEM

Arranging the field position causes duplication of the Shape field when publishing a layer as an ArcGIS Server map service

Last Published: April 25, 2020

Description

When a field is placed after the Shape, Shape.STArea(), and Shape.STLength() fields in the attribute table of a layer in an enterprise geodatabase, publishing the map as an ArcGIS Server map service results in the duplication of the Shape field and the Shape.STArea() field is removed.

The Shape field is duplicated and the Shape.STArea() field is missing

Cause

The Shape, Shape.STArea(), and Shape.STLength() fields are appended at the end of the attribute table by default in an enterprise geodatabase. The behavior occurs when a field is moved (or added) to the end of the attribute table, causing the position of the fields to change. Another Shape field is created at the REST endpoint when the map is published as a map service in ArcGIS Server, which replaces the Shape.STArea() field and thus, results in the Shape.STArea() field disappearing from the map service. This is a known issue and is logged as a bug.

Solution or Workaround

Warning:   
It is highly recommended not to move the Shape, Shape.STArea(), and Shape.STLength() fields or to move any other fields to the end of the attribute table before publishing. 
Reposition the order of the fields in the attribute table before republishing the map. To do so, follow the steps provided:
Note:
Newly created fields, which are appended at the end of the table by default, must also be repositioned.
  1. In ArcMap, right-click the layer in the Table Of Contents, and select Properties.
  2. In the Layer Properties dialog box, go to the Fields tab.
  3. Arrange the fields using the up and down arrows. The correct ordering of fields in the attribute table is as follows: user-created fields, the Shape field, the Shape.STArea() field, and the Shape.STLength() field, and click OK.
Arrange the fields in the Layer Properties dialog
The correct position of fields in the attribute table
  1. Republish the map.
Note:
Alternatively, the position of fields can also be arranged by dragging the fields to the desired position in the attribute table. 

Article ID:000015247

Software:
  • ArcGIS Server

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Related Information

Discover more on this topic