Select to view content in your preferred language

"last_edited_user" versus "Editor" field

152
5
Jump to solution
a week ago
D_Atkins
Regular Contributor

We maintain data in both Enterprise SDE and hosted on Enterprise Portal.  When writing scripts, we often need to assess the "last_edited_date".

Today, I ran into a hosted layer where the editor tracking fields are "Editor" and "EditDate" (entirely different from SDE)... we tried searching for some documentation but came up empty.

What can we do to ensure all editor tracking fields are the same across our layers?

0 Kudos
1 Solution

Accepted Solutions
DavidSolari
MVP Regular Contributor

If you're writing scripts you can use the Editor Tracking Describe Properties to find the appropriate field without hardcoding a common name.

View solution in original post

0 Kudos
5 Replies
CodyPatterson
MVP Regular Contributor

Hey @D_Atkins 

From what I can see, the Editor and EditDate are older fields that are no longer applied to newer layers. To fix that, you'll need to either create the fields "last_edited_date" or similar, and then use the manage function to change which fields the editor tracking is written to:

CodyPatterson_0-1759166795529.png

Cody

0 Kudos
D_Atkins
Regular Contributor

Thanks for the quick response!  The EditDate and Editor field are appearing on layers published today, so I don't think it's purely age-related.

We found this short exchange from five years ago, Track feature layer request for "CreationDate" ver... - Esri Community; while the emphasis on monitoring a Feature Service's editfieldsinfo is probably wise, it seems overzealous for quick scripts when our RDBMS manages to keep these 4 fields consistent...

0 Kudos
D_Atkins
Regular Contributor

... not.

0 Kudos
DavidSolari
MVP Regular Contributor

If you're writing scripts you can use the Editor Tracking Describe Properties to find the appropriate field without hardcoding a common name.

0 Kudos
D_Atkins
Regular Contributor

I still wish we could have a definitive answer on why Portal is assigning those different field names but at least Describe is a reasonably concise way of handling them.

0 Kudos