Auto populate Related table from Parent table using Arcade in AGOL?

7731
22
Jump to solution
12-22-2023 05:14 AM
Labels (2)
KGalluccio
Regular Contributor

Is is possible to auto populate fields in a related table from the selected record in the parent table using Arcade in AGOL? 

I have a AGOL web map that includes one hosted feature layer with a related table with a one to many relationship.  The number of features in the feature layer is static.  Using forms, the map allows the user to select a feature and edit it's attributes, including adding records to the related table.  

The work process is that the current attributes of the selected feature need to be added as a new record in the related table, and then updated with new information.

When the user selects a feature to edit, then clicks to add a record to the related table, I would like the fields to auto populated with the selected features attributes.  

Is this possible?

Tags (2)
0 Kudos
22 Replies
Marisa_Kordecki
Regular Contributor

I'm hoping someone here might have an idea of a similar issue I am having. 

I am trying to populate my related table with a parent table field. I do not get any errors when I use the calculation in AGOL on the field, but as there is no undo I would really prefer to do the calculation in ArcPro. 

Using the exact same code that would work in AGOL in my calculate field in ArcPro, I get an error that they cannot find the related tables.

0 Kudos
Marisa_Kordecki
Regular Contributor

I do not know why this is incorrectly marked as a solution. 

AdamAull
Emerging Contributor

I have a very similar workflow that needs a solution in ArcGIS Online Arcade.

A map was created with feature service containing a feature layer and its related table. The feature layer and related table both have an address field. The address field in the feature layer is calculated based upon an Arcade expression. The address field in the related table needs to be calculated based upon the related record's feature.

The workflow has a user creating a new feature and the Arcade expression populates the feature's address field. The user then creates a record related to the new feature and enters attribute values. An Arcade expression needs to pull the address from the feature into the related table record.

I can't seem to get the provided solution to run. Anyone have additional ideas?

0 Kudos