Having two feature classes in SDE geodatabase like
- EGDB.North.Parcels
- EGDB.North.ProjectsInvest
I am trying to get the total count of Intersection between EGDB.North.Projects in EGDB.North.ProjectsInvest using Attribute rules like this
var intersects = Intersects(FeatureSetByName($datastore, "EGDB.North.Parcels"), Geometry($feature)); return Count(intersects) ;
but I am getting this error
002717: Invalid Arcade expression
var intersects = Intersects(FeatureSetByName($datastore, "EGDB.North.Parcels"), Geometry($feature));
if(Count(intersects)>0){
return Count(intersects);
}
else{
return 0;
}
Using reserved function names as the name of a variable is a bad idea. Try using "var inter =" instead.
Also, you do not need to use fully qualified names for FeatureSetByName. Just use "Parcels".
Thanks for reply Ted but nothing changed!
var inters = Intersects(FeatureSetByName($datastore, "Parcels"), Geometry($feature));
return Count(inters) ;
still getting same error message
That looks valid.
You could try exporting those features classes to FGDB or MGDB to see if the problem is specific to SDE.
Well, this is weird!
As you recommended I copied both
- EGDB.North.Parcels
- EGDB.North.ProjectsInvest
into a local FGDB and this is working now
var inters = Intersects(FeatureSetByName($datastore, "Parcels"), Geometry($feature));
return Count(inters)
So, why this is happening in SDE? how can I fix this? Is there any solution for this? Thanks
I believe this is the same issue found here
I recommend contacting Tech support for a way forward