I am trying to create an attribute rule that takes the values of a field named 'GIS_TractAcres', group them according to a shared ParentPropertyID, sum them, and add them to a field named GIS_PropertyAcres. All of these fields are within the same layer. I have tried the GroupBy function, but for some reason, it just doesn't work. Thanks for any help that anyone you can provide!
Solved! Go to Solution.
I don't think GroupBy is exactly the right choice here. It does group the features, but then you still have to filter for your current ParentPropertyID. Might as well filter first and then call Sum().
var id = $feature.ParentPropertyID
var fs = Filter($featureset, "ParentPropertyID = @ID")
return Sum(fs, "GIS_TractAcres")
I don't think GroupBy is exactly the right choice here. It does group the features, but then you still have to filter for your current ParentPropertyID. Might as well filter first and then call Sum().
var id = $feature.ParentPropertyID
var fs = Filter($featureset, "ParentPropertyID = @ID")
return Sum(fs, "GIS_TractAcres")