Updating Parent Attribute upon submission of a new child

558
2
02-12-2021 05:40 AM
DamonBreen
New Contributor III

Hi,

I have an inspection map for a natural gas company. The end users will typically go out and do inspections on dozens of different point and area features in a year. The way it works currently, is that we have a specific feature layer, like "Valve" and one of the attributes is "Completed?". An end user will go to a valve, create a new related inspection and answer all of the questions and submit it, and then return to the parent feature and change the "Completed?" attribute from the default "Not Completed" to "Completed, but not Approved". This also interacts with the symbology and turns that valve from red to yellow, signaling the user that they have already been to that valve and lets them keep track of their progress. 

 

I thought if there was a way that I could build into Arcade a way that when a new inspection has been submitted to the inspection table within the last year, it would automatically update the attribute in the parent feature and allow the guys to skip one step of the process. I'm not sure if there is a way to do this, and if there is whether I would do it in ArcGIS pro (where the map is authored) or in AGOL. The users get the map in Collector, and I'm not sure that the programming to make this happen would even transfer over into Collector, as some of the features seem to not.

 

Any help would be appreciated. Thanks in advance.

 

0 Kudos
2 Replies
MatthewDriscoll
MVP Alum

I do this in Pro by creating templates and inserting a default value of the year attribute before publishing.   Once that is done the year will be automatically populated in collector/agol with whatever I put in there when a new feature is created.  

https://pro.arcgis.com/en/pro-app/latest/help/editing/create-a-feature-template.htm

* After re-reading the post, I am not sure this would work, I believe it only works on newly created features.  

0 Kudos
DamonBreen
New Contributor III

Yeah, we use defaults on some things, and they only apply to creating new features it seems. The idea would be that this map would stay up for years to come, and if we do these inspections annually, the program would look to see if any inspections had been submitted for the last year. If so, then the feature is considered complete, if the inspections are beyond a year, then they would reset to not complete. But the feature already exists, so I agree that this wouldn't be the solution I'm after.

0 Kudos