I have an attribute rule that runs on a field within a point feature class. The value of said field is passed to a desired related table field when said parent field is populated or updated. There is a 1:M relationship class using the GlobalID of the feature class and GUID of the table. As it stands, only the FIRST table record receives the updated value if there are multiple records associated with a single feature. This is due to the Arcade code using the 'First' FeatureSet function. I borrowed and adjusted this code to get me this far but I don't know how to further adjust it so ALL related records receive the same update from the parent field. Any help would be great!
if($originalfeature.Size == $feature.Size) { return }
var TEST = First(FeatureSetByRelationshipName($feature, "OCGIS.DPW_TESTING_REL"))
if(TEST == null) { return }
return {
"edit": [
{
"className": "OCGIS.DPW_TESTING_Table",
"updates": [
{"globalID": TEST.globalid, "attributes": {"Size": $feature.Size}}
]
}
]
}