Automatically calculate a field based off another field

381
6
10-01-2019 06:22 AM
Highlighted
New Contributor

I'm trying to calculate a field based off another field each time a new feature is created or when the field being calculated from is changed.  For example, I have a sewer cleaning line feature class with a "Date Cleaned" field and a "Years Since Cleaned" field.  I want the "Years Since Cleaned" field to auto populate with the number of years, today's date minus "Date Cleaned" field to give me a number, or automatically change when the "Date Cleaned" field's data is modified or new data is added.

Tags (1)
Reply
0 Kudos
6 Replies
Highlighted
MVP Regular Contributor

Where is the data stored? In a File gdb, Enterprise gdb, etc?

Reply
0 Kudos
Highlighted
New Contributor

Currently the data is in a file geodatabase which is zipped and uploaded to Portal for ArcGIS as a hosted feature layer. This is done to test as the project is developed.  Eventually the data will be uploaded to an enterprise database and published as a service.

Reply
0 Kudos
Highlighted
Esteemed Contributor

If you do go down the Attribute Assistant (AA) route, remember that AA is tied to ArcMap that will eventually be deprecated and replaced by Pro (still many years away) and its associated Attribute Rules.  If you can, I would suggest trying to get this set up in Pro so you don't have to perform this task twice.

Highlighted
New Contributor

You are correct in the fact that I should try to create this in ArcGIS Pro.  However we are using ArcFM on top of ArcMap which creates extra tables in the enterprise database that are updated when editing features so Pro may not be an option for us right now.

Reply
0 Kudos
Highlighted
New Contributor

Thanks, I'll take a look at these links.

Reply
0 Kudos