HOW TO

Permanently change the order of records in a feature class, shapefile, or table according to a particular field's values

Last Published: April 25, 2020

Summary

The geographic features in an attribute table are arranged so each row (record) represents a feature, and each column (field) represents one feature attribute. The records can be sorted in the attribute table in either ascending or descending order by a selected field. Typically, when a field is sorted in the attribute table, the sort order is only saved to the map document and does not apply back to the actual feature class, shapefile, or table.

The instructions provided describe an option for permanently changing the order of records stored in a feature class or shapefile according to a specified field(s).

Procedure

The Sort (Data Management) tool can be used to reorder, in ascending or descending order, records in a feature class, shapefile, or table based on one or multiple fields. The reordered result is written to a new dataset.

  1. From the Standard toolbar in ArcMap, click the ArcToolbox button to open the ArcToolbox window.
  2. Expand Data Management Tools > General, and double-click Sort to open the Sort tool.
    [O-Image]
    Note:
    Alternatively, search for Sort (Data Management) in the Search window.

  3. Click the Input Dataset drop-down arrow, or the browse button, and select the input feature class, shapefile, or table to be sorted.

    Note:
    The Output Dataset is automatically specified. To change the Output Dataset, click the browse button on the right of the Output Dataset text box, and select an output location and name for the feature class, shapefile, or table to be created.

  4. Click the Field(s) drop-down arrow. Specify the field(s) values used to reorder the input records, and the direction the records are sorted.

    ASCENDING — Records are sorted from low value to high value.

    DESCENDING — Records are sorted from high value to low value.


    Note:
    For the Field(s) parameter, sorting by the Shape field or by multiple fields is only available with an Advanced license. Sorting by any single attribute field (excluding Shape) is available at all license levels.


    Note:
    Optional: Click the Spatial Sort Method drop-down arrow to select a method. This option specifies how features are spatially sorted. Spatial Sort Method is only enabled when 'Shape' is selected as one of the sort fields.

  5. Click OK to run the Sort dialog box.
    [O-Image]

Article ID:000012218

Software:
  • ArcMap

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Related Information

Discover more on this topic