Hello,
I am trying to make an attribute rule that calculates the length of Water Pipe within a polygon. I have had some success with this arcade code:
var WatPipe=featuresetbyname($datastore,'WAT_Pipe',['*'])
Var Pipewithin=contains($feature,WatPipe)
return sum(length(Pipewithin))
After getting this to work, I realized it was grabbing all the water pipes contained in the polygon which included the abandoned and removed water pipes.
Is there away to filter the feature set first? I tried this and didnt have any luck
var WatPipe=filter(featuresetbyname($datastore,'WAT_Pipes',['*']),'status= in service')
var Pipewithin=contains($feature,WatPipe)
return sum(length(Pipewithin))
Please help