11

I am using Arc Desktop 10.3.1 in a versioned environment. In the geodatabase for the service requests there is a field called Date Notified. I would like this field to be auto-populated with the current date\time when a new feature is created. ( See attached picture) I have tried setting the field to Now() (Now) (Current_Timestamp) and others and each time it tells me my syntax is incorrect. Is this possible to do and if so what is the correct syntax to accomplish this.

Also I am aware of attribute assistant but I do not want to use that.

enter image description here

6

I don't think there is a way to do that for a particular date field, and this link provided by Get Spatial confirms it. However, if you turn on Editor Tracking, it will create fields for:

  • Creation Date
  • Creator
  • Last Edit Date
  • Last Editor

You have the option to name these fields to whatever you want. So, you could call the Created Date Field "Date Notified" if you like.

Note, Editor Tracking is turned on at a feature class level. So you'll need to turn it on for every feature class you have. This should be a trivial exercise with a python for loop.

  • 2
    This link seems to support your answer. It specifically states that autopopulating is not possible. It is a few years old, but nothing newer is coming up that is relevant. Feel free to incorporate this into your answer for a source direct from Esri. – Get Spatial Nov 4 '15 at 23:46
  • 2
    You can use Editor Tracking to specify a particular existing date field (and ignore the others if you don't want to use them) - you don't need to have it create new fields for you – Midavalo Feb 23 '16 at 23:29
1

I was able to do that in ArcGIS 8.x or 9.x. Someone else had done it and gave instructions on how to do it on one of the forums, basically I copied some code in one of the .dll's in the bin folder which would take the Date and Time from the computers clock and autopopulate a field you specified. However, when I upgraded to ArcGIS 10.x written in Python I lost that function and I haven't seen anyone come up with something similar.

  • If you come across that old forum post or the method would you mind sending it my way. thanks! – ed.hank Dec 30 '15 at 14:33
1

In doing a quick search, I may have found the answer from another forum. Look for the following message and attached to it is the dll file to add the timestamper to your ArcGIS.

Timestamper for ARCGIS 10 melansi Aug 17, 2010 5:48 AM (in response to melansi) Hi, you can take visual studio and compile the app, or you take the atteched dll and the bat file. I have compilled the timestamper 2010 files to the dll in visual studio express, and had help by a friend for the bat file. Copy the bat and the dll in a new directory and change in the bat file the path for the common files (only to change for XP, bat is for windows 7) start bat with admin rights. Have fun Astrid

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.