My code works fine in ArcGIS Pro and in Map Viewer but I cannot get it to work in field maps when there are other records. If I remove all child records and create the parent fresh it works but as soon as I have one record I cannot add another. The calculated field says "Failed to Calculate" and I can't figure out why.
var child_fs = FeatureSetByRelationshipName($feature,"TurfArea",["Area", "Status"])
var filterd_child_fs = Filter(child_fs, "Status = 0")
if(filterd_child_fs == null) { return }
return Sum(filterd_child_fs, "Area")
If anyone can help me out here I would greatly appreciate it.
Is it maybe a 1:1 relationship? Also try using FeatureSetbyName instead it has been posted on here many times that ByRelationshipName does not work a lot of the time (search the board on it). Esp with special chars in the name. Changing to ByName seems to do it.
Hope that helps