Hello, I am creating a rule that will set the value in a field called 'tail_length' to 60 if a new feature intersects a point called "pole", and 100 if it does not. However when I create a new point, it always sets the value to 100 even if it intersects a pole. Any insights?
var poles = FeaturesetByName($datastore, "Poles");
var ints = Intersects(poles,Geometry($feature));
if(Count(ints) < 0){
return 60; }
else {
return 100;}
Hi @rsnider43,
You set your argument features to less than 0. Try switching it to == 0 and that should fix your issue. An easier way to write it is.
var poles = FeaturesetByName($datastore, "Poles");
var ints = Intersects(poles,Geometry($feature));
iif( Count(ints) > 0, 60, 100 )
Hey I did try that with snapping enabled, unfortunately it still puts out a value of 100 even when it is intersecting a pole.
Try swapping the arguments in the intersects and see if that changes things. Sometimes I find that will often do the trick.