Hello,
I am attempting to use arcade to push edits from a parent feature class to all of its related child records.
// get the related asset
var asset_id = $feature.CaseNumber
var assets = FeatureSetByName($datastore, "epgdb.DISPATCH.EOCSearchedAreas")
var asset = Filter(assets, "CaseNumber = @asset_id")
console (count(asset))
for (var a in asset)
{
return {
edit: [{
className: "epgdb.DISPATCH.EOCSearchedAreas",
updates: [{
objectID: a.OBJECTID,
attributes: {
Active: $feature.Active,
}
}]
}]
}
}
Both the parent dataset and the child have fields called CaseNumber and Active. When a new child record is created, there's an attribute rule running an intersect that populates the case number from the parent feature, which works just fine. We want to be able to ensure that all of the child areas' "Active" values reflect the same as the parent.
This code winds up pushing the edit to the first related record, but not all of them, which is what I would expect from the for loop. The count in the console does show that there are multiple features passing through the filter.