Enabling editor tracking on a hosted feature service
You can keep track of who edits features in hosted feature services shared to portal members by enabling editor tracking on the feature class (or feature classes) that are used in the feature service.
If editor tracking is set on the feature class, the account information for the person who edited the hosted feature service is recorded in the feature class, along with the date and time the edit was made. The fields to record this information must exist in the feature class before editor tracking can be enabled.
Source data for hosted feature services is stored in the managed database registered with your portal's hosting server. The feature class is owned by the account used in the connection file that was registered with the server. Therefore, you must log in to the managed database using that account to enable editor tracking on the feature class.
Find the name of the feature class
If you do not know the name of the feature class in the hosting server's managed database, you can check the Service Workspace of the service.
-
Start ArcCatalog, expand GIS Servers in the Catalog tree, and make a publisher or administrator connection to the hosting server.
Connect as either the ArcGIS Server administrator or the owner of the service.
- Open the Hosted folder under the server and choose the service for which you want to enable edior tracking.
- Right-click the service and click Service Workspaces.
- Click the Copied tab and expand the database.
The name of the feature class (or feature classes) in the hosting server's managed database is listed here.
- Make note of the feature class name, and close the Service Workspaces dialog box.
Stop the hosted feature service
You must stop the service to enable editor tracking. To do this, right-click the service and click Stop.
Connect to the managed database and enable editor tracking
Connect to the enterprise geodatabase as the owner of the feature class and enable editor tracking.
If the feature class does not contain the text and date fields necessary to store of the creator name, editor name, creation date, and date the feature was last edited, add those fields to the feature class.
- Connect to the enterprise geodatabase that is registered as your hosting server's managed database.
You must connect as the owner of the feature class. The owner is the account that was specified when the geodatabase was registered as the server's managed database. If you do not know what account that is, contact your ArcGIS Server administrator.
- If the feature class already contains fields for storing the creator's name, date a feature was created, editor's name, and date the feature was last edited, use the feature class Properties dialog box to enable editor tracking.
- Right-click the feature class and click Properties.
- Click the Editor Tracking tab.
- Click Enable editor tracking.
- Use the drop-down lists to specify which fields to use to record editor information.
- Choose to record dates in UTC.
- Click OK to close the Properties dialog box and apply your changes.
- If the feature class does not contain fields for storing creator and editor names and dates, use the Enable Editor Tracking geoprocessing tool to enable editor tracking.
- Open the Enable Editor Tracking tool.
- Specify the feature class for which you want to enable editor tracking in the Input Dataset field.
- Check the box next to Add fields if they don't exist .
- Type names for the fields that will record the name of the user who adds features, the date the feature was added, the name of the user who last edited the feature, and the date the feature was last edited in the Creator Field, Creation Date Field, Last Editor Field, and Last Edit Date Field text boxes respectively.
- Choose to record dates in UTC.
- Click OK to run the tool.
Start the service
Now that you have enabled editor tracking, you can restart the hosted feature service. Right-click the service under the hosting server connection in the Catalog tree and click Start.
With editor tracking enabled on the feature class, ArcGIS Server will record the user name of anyone who adds a feature through the hosted feature service or alters an existing feature. ArcGIS Server will also record the date and time the feature was added or altered. However, if the hosted feature service is shared with everyone, no user name will be stored.