ArcGIS Desktop

  • Documentation
  • Support

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

GIS in your enterprise

ArcGIS for Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

ArcMap

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • Extensions

Enable Editor Tracking

  • Summary
  • Usage
  • Syntax
  • Code sample
  • Environments
  • Licensing information

Summary

Enables editor tracking for a feature class, table, mosaic dataset, or raster catalog.

Learn more about editor tracking

Usage

  • This tool can add fields if they do not already exist. If fields do exist, they must be of the correct type. Creator Field and Editor Field must be string fields, and Creation Date Field and Last Edit Date Field must be date fields.

  • Editor tracking applies to operations on existing datasets only. It does not apply to operations that create new datasets. For example, if you copy and paste a dataset to create a new one, tracking values will not update in the new dataset.

  • You can record the dates of edits in either the database's time zone or in UTC (Coordinated Universal Time).

    If you're planning on copying or replicating data across time zones, or editing through a feature service, use UTC. Since editors can apply edits from potentially anywhere in the world, UTC works well because it ensures times are recorded in a universally accepted and consistent way.

    Configuring your editor tracking to use the database's time zone is only recommended if you are certain that all edits will be performed within the same time zone.

  • You can run this tool on a dataset that already has editor tracking enabled, but only to enable tracking of additional information. For example, if a dataset is only tracking the creator and creation date, you can run this tool to add the tracking of the editor and last edited date. This tool cannot disable tracking on a field, cannot switch tracking from one field to another, nor can it switch between UTC and database time. If you need to perform any of these operations, disable editor tracking on the input dataset before you run this tool.

  • You can enable editor tracking on several or all the datasets in a geodatabase by using this tool in ModelBuilder. The Catalog window allows you to enable tracking on more than one dataset at a time. See Enabling editor tracking on multiple datasets for more information.

  • Legacy:

    Editor tracking works in 10.1 and later release clients only. ArcGIS 10.0 and 10.0 SP1 clients can access datasets that have editor tracking enabled, however, any edits these clients make are not tracked. Making schema changes with these clients should be avoided, as this disables editor tracking on the dataset. ArcGIS 10.0 SP2 and subsequent 10.0 service pack clients cannot access datasets that have editor tracking enabled.

Syntax

EnableEditorTracking_management (in_dataset, {creator_field}, {creation_date_field}, {last_editor_field}, {last_edit_date_field}, {add_fields}, {record_dates_in})
ParameterExplanationData Type
in_dataset

The feature class, table, mosaic dataset, or raster catalog that will have editor tracking enabled.

Dataset
creator_field
(Optional)

The name of the field that will store the names of users who created features or records. If this field already exists, it must be a String field.

String
creation_date_field
(Optional)

The name of the field that will store the dates features or records were created. If this field already exists, it must be a Date field.

String
last_editor_field
(Optional)

The name of the field that will store the names of users who last edited features or records. If this field already exists, it must be a String field.

String
last_edit_date_field
(Optional)

The name of the field that will store the dates features or records were last edited. If this field already exists, it must be a Date field.

String
add_fields
(Optional)

Specifies whether to add fields if they don't already exist.

  • NO_ADD_FIELDS —Fields will not be added. Fields specified must already exist. This is the default.
  • ADD_FIELDS —Fields will be added if they don't already exist.
Boolean
record_dates_in
(Optional)

The time created date and last edited date will be recorded in. The default is UTC (Coordinated Universal Time).

  • UTC —Record dates in UTC (Coordinated Universal Time). This is the default.
  • DATABASE_TIME —Record dates in the time zone in which the database is located.
String

Code sample

EnableEditorTracking example (Python window)

The following Python window script demonstrates how to use the EnableEditorTracking tool in immediate mode.

import arcpy
arcpy.EnableEditorTracking_management("d:/RC.gdb/Buildings","Creator","Created","Editor","Edited","ADD_FIELDS","UTC")
EnableEditorTracking example 2 (stand-alone script)

The following stand-alone script demonstrates how to enable editor tracking on all the feature classes and tables in a geodatabase.

# Name: EnableEditorTracking_Ex02.py
# Description: Enables editor tracking for all datasets in a geodatabase

# Import system modules
import arcpy
import os

# Set the workspace
workspace = arcpy.GetParameterAsText(0)

# Set the workspace environment
arcpy.env.workspace = "d:/test/data.gdb"

# Get all the stand alone tables and feature classes
dataList = arcpy.ListTables() + arcpy.ListFeatureClasses()

# For feature datasets get all of the featureclasses
# from the list and add them to the master list
for dataset in arcpy.ListDatasets("", "Feature"):
    arcpy.env.workspace = os.path.join(workspace,dataset)
    dataList += arcpy.ListFeatureClasses()

# Execute enable editor tracking
for dataset in dataList:
    print('Enabling tracking on ' + dataset)
    arcpy.EnableEditorTracking_management(dataset, "ET_CREATOR",
        "ET_CREATED", "ET_EDITOR", "ET_EDITED", "ADD_FIELDS", "UTC")
print('Enabling complete')

Environments

This tool does not use any geoprocessing environments.

Licensing information

  • ArcGIS Desktop Basic: Yes
  • ArcGIS Desktop Standard: Yes
  • ArcGIS Desktop Advanced: Yes

Related topics

  • An overview of the Fields toolset

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS Platform

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Insiders Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
Copyright © 2017 Esri. | Privacy | Legal