The idea would be to add TRIGGER like functionality to hosted feature services. The trigger would initiate Arcade expressions or SQL or other defined logic when an UPDATE, INSERT or DELETE occurs on a record. It should be dynamic i.e. something that happens automatically and also works offline.
This idea would enable:
- The ability to update parent table attributes when an INSERT, UPDATE or DELETE occurs on a related tables.
- The ability to add or update feature layer records when an INSERT, UPDATE or DELETE occurs on another feature layer.
- The ability to define logic. For example, add related records when certain logic is satisfied on a parent table i.e. when a value in a parent table attributes reaches a certain value then add a new related record.
- Enables the following scenario to avoid post processing: Say I have a feature service named "trees" (hosted feature service in AGOL). Within it I have a feature layer (point) called "tree_assets" and a related table called "inspections". Each time an inspection is created or edited, I want to update the tree_assets feature layer attribute "latestInspection" with the edit date of the latest inspection record. This way, I can symbolise the parent layer (tree_assets) to have green dots (inspected in the last week) and red dots (inspected prior to 1 week ago) on the map.
I guess this is both an ArcGIS Online and a Field Maps Idea but I couldn't figure out how to tag it to both.