Track editors and edits using JS API 3.9

6690
17
Jump to solution
06-20-2014 08:08 AM
AlexGole1
New Contributor II
Hi all,

I am trying to get started on building a web app that would allow our users to verify who, what, and when a layer was last edited last.


I am wondering if any of you have tips, examples, or other to get me started?

Below is a picture of (roughly) what I intend to create.

Thank you,
Alex
[ATTACH=CONFIG]34774[/ATTACH]
0 Kudos
17 Replies
AlexGole1
New Contributor II
Archiving maintains the history of the geometry and all the fields.  Since editor tracking just records information in fields, the history is maintained as well.  Take a look at the screen shots below.  You can see the 'Last Edited User' and 'Last Edited Date' fields are different values.  This will show what was edited, who edited the feature, and when the feature was edited.

[ATTACH=CONFIG]34848[/ATTACH][ATTACH=CONFIG]34849[/ATTACH]


How do you access the archived data? A simple identify is enough to show me who edited the feature last? Is "queriable"? When I enable archiving the table I have stay the same, i do not have 'Last Edited User' and 'Last Edited Date' fields. It is only when I turn on track edits that they are added.

Thank you for time and sorry I am completely newbie on archiving/tracking data.
Alex
0 Kudos
JakeSkinner
Esri Esteemed Contributor
You will want to enable editor tracking, and then enable archiving.  Once archiving is enabled, add the archive class to ArcMap following the steps in this link:

http://resources.arcgis.com/en/help/main/10.2/index.html#//003n000000rr000000

The archive class will store all of the edit history.  You will want to publish this as a service, and then access this service in your application.
0 Kudos
AlexGole1
New Contributor II
You will want to enable editor tracking, and then enable archiving.  Once archiving is enabled, add the archive class to ArcMap following the steps in this link:

http://resources.arcgis.com/en/help/main/10.2/index.html#//003n000000rr000000

The archive class will store all of the edit history.  You will want to publish this as a service, and then access this service in your application.


Thank you! I think the only thing I dont see now is the "user" you showed on your screen shot. I have the time and everything but not user.
Alex
0 Kudos
JakeSkinner
Esri Esteemed Contributor
Is the user showing as blank?  Try making some edits to the feature class and see if the user becomes populated.  Also, be sure you are showing the 'last_edited_user' field and not the 'created_user' field.
0 Kudos
AlexGole1
New Contributor II
Is the user showing as blank?  Try making some edits to the feature class and see if the user becomes populated.  Also, be sure you are showing the 'last_edited_user' field and not the 'created_user' field.


My bad I was only looking at the "created_user".
It all works!
Thank you,
Alex
0 Kudos
AlexGole1
New Contributor II
One thing I notice is that when I want to publish the Archive class "Acres Archive" ArcGIS Server does not accept it because it is not registered layer. Is it possible to register an archive class then?
0 Kudos
DarkoRadiceski
New Contributor II

Hi Alex,

Were you able to get this resolved?

0 Kudos
DaveBarrett
Occasional Contributor

Hi,

been looking at this problem today and have found that if you want to publish the archive class you can create a view to the class in the database connection eg SELECT * FROM name_H

when adding to ArcMap you need to use the archive OID as the unique identifier. This will then publish To arcgis server.

Hope this helps

Dave

0 Kudos