I have an attribute rule that updates a field with the newest creation date of related records in a relationship class:
var results = FeatureSetByRelationshipName($feature, "Post_To_Sign", ['*'], false);
var latest = null;
for (var r in results) {
if (latest == null) latest = r;
if (latest.creationdate < r.creationdate) latest = r;
}
return latest.creationdate;
(I assume there is an Arcade function that would return the record with the max creationdate, like Max, but I didn't feel like figuring out the syntax).
Right now that attribute rule only updates when I update the "one" side of the 1:M relationship. What I would like to do is trigger that attribute rule when a related feature is created. Is there a way to trigger that? Features seem to be immutable, or else I would just create an attribute rule on the related record to update that field on insert.