Select to view content in your preferred language

Trigger an update on Parent Layer when the Child record is updated.

186
3
04-03-2025 02:53 PM
gis_KIWI4
Frequent Contributor

Hi Team, 

Hoping if anyone has an answer here. 
Scenario -Feature layers A and B are related by a relationship class. When I update a record in B and I want it to trigger an arcade calculation on related record in A (without actually editing A manually to trigger the arcade on it) 

We use the webhook + powerautomate to do this but would be good to straight within AGOL. 

3 Replies
ChristopherCounsell
MVP Regular Contributor

It's not possible to do this with database level triggers in ArcGIS Online.

I have found the best way is to use ArcGIS Notebooks.

  1. Add a 'processed' field to the related record and calculate it to 'no'
  2. Create an ArcGIS Notebook in ArcGIS online to:
    1. query the related table where processed=no
    2. Update the parent record as required using python
    3. Update the related record to processed=yes
  3. Schedule the python notebook to run as often as required noting there'll be a nominal credit cost, can run as often as 15 minutes, and (UTC timezone only) you can choose the hours it will run
  4. Optionally use arcade to display on the parent feature that there are pending records in the related table (so users know it will be updated within 15min but they can see the related record.

This is better than power automate as it's within the Esri ecosystem, lets you re-run the event if it fails, gives you a lot of capability with python (handle attachments, get other layers etc).

KeithSalmon
Occasional Contributor

Our users want to see the symbology change in the parent record and on the map within seconds.

It would be really good if one could access database level triggers in ArcGIS Online.

Hopefully this will come one day soon.

0 Kudos
ChristopherCounsell
MVP Regular Contributor

Here's an article using joins but personally doesn't work for our workflows so not sure how viable it is:

https://support.esri.com/en-us/knowledge-base/how-to-symbolize-hosted-feature-layers-using-related-t...

Here's an idea you can support and some discussion on workarounds:

https://community.esri.com/t5/arcgis-enterprise-ideas/symbolize-published-layer-using-related-table/...

Technically this option would be available for ArcGIS but it requires enterprise and database level triggers. Here's an idea to support it for ArcGIS Online:

https://community.esri.com/t5/arcgis-online-ideas/run-calculate-field-or-a-trigger-when-performing/i...

Lastly, related form elements will be released soon for field maps. It means you could change user workflows to be edit parent > add related data via form > submit edit against parent, using calculations or manual edits against the parent made as the workflow. This is currently available in web map viewer but not field maps.