I have recently set up a system for tracking our sign inventory in town. I have a sign post hosted feature layer with 2 related tables. One table is to track the signs on the sign post in town and the other is to track inspections/repairs done at each sign post.
My question is: Is there a way where if a sign post is removed, the signs associated with that feature are automatically deleted?
I would only want this to occur in the sign table, as inspection and repair records are still useful to keep even if the feature no longer exist though I wont know what feature they were for but just that they occurred. When I look at the sign table I can see that for child records with a deleted parent record the GUID is empty. There is also a locked field called signpost that shows (0) compared to the signs with a parent feature still existing represented by (1).
My ideas on possible solutions:
1st: I could possibly create a field in the sign post layer called 'discontinued' and filter out those records that have a 'Yes' value from my maps. Then I could maintain the relationship between the feature and records, however I would need to filter out the records related to a discontinued post when reporting or displaying with a dashboard the number of signs in town.
2nd: I could have the field worker delete the sign post and probably use the empty GUID field in the sign table remove those records with a script but I am not familiar with the process of scripting for data in a related table hosted on arcgis online...
3rd: The field worker could delete the related signs prior to deleting the sign post...which is fine until they forget to do it
The primary purpose of tracking all of this is to know where the signs post are, what number signs we have in town, and which signs need to be inspected or repaired/replaced. I have gone a bit beyond that with also trying to track what work was done to the signs as well. The complete removal of a sign post is rare but I'm just trying to plan ahead so I can keep the sign counts accurate.
Anyway I am still new to this world of relational data so any thoughts are appreciated!