Select to view content in your preferred language

Script to automatically fill attribute fields after snapping

1125
4
05-24-2022 09:19 AM
AliSaribas
New Contributor

Hi, I am a GIS Technician at a large water utilities company tasked with editing their resources and operations in GIS. I am currently drawing customer service lines from water mains to customer points, and I was wondering if there was a way to automatically transfer the text from a field in the newly generated service line to the customer point itself. Basically, whenever I create a new service line, an ID is automatically generated, but I need to then copy that new ID to a field in the customer point for service line IDs. This might be a long shot, but is there a way I can automate this process through a script in Arcade or Python?

So, I am looking to see if it's possible to automatically populate a the service line field in customer point's attribute table after I snap the service line polygon to said customer point. I am doing hundreds of these drawings per day, so if I was able to skip the copying it would save me a lot of time and help my sanity a bit. Thank you!

0 Kudos
4 Replies
RobHerr
New Contributor II
Check out the Attribute Assistant. You can customize which fields to update https://solutions.arcgis.com/shared/help/attribute-assistant/




KevinBrenninkmeijer4
New Contributor

I second this, check out Attribute Assistant if you are working in ArcMap. You could use the Update Intersecting Feature Method (see attachment for example). If you are working in ArcGIS Pro check out Attribute Rules.  

KimGarbade
Regular Contributor

There sure is a way using Arcade.  I used this article when I first tried it and it worked great.  In your case I think the rule would be added to the service line's insert event.

Advanced Attribute Rules – Editing features on another class with attribute rules (esri.com)

AliSaribas
New Contributor

Hi I appreciate the feedback, our company already uses attribute rules. I apologize, I should have been more specific. After talking to a colleague of mine, the biggest obstacle is conducting a 1 to many relationship instead of a 1-1, since we would be trying to populate three fields with two not even connecting to the customer points. 

One to One:  Customer > Customer Service Line

One to Many:  Customer > Customer Service Line > Curbstop > Company Service Line

I managed to find an older post that concerns something fairly similar and in theory, might be able to be replicated in my situation, but I am not sure yet. Does anyone have any thoughts? I do not have any experience with Arcade so I am not sure. 

0 Kudos