Hello, I have written a rule that is supposed to set the value in the point attribute table to 100 if it intersects a line. I have written this script so far, but it keeps evaluating to false even if then new point is snapped to a line feature. Any ideas on how to get this to work?
var fibercable = FeaturesetByName($datastore, "attributeruletest.sde.fibercable", ['*'], true);
if(intersects(Geometry($feature), fibercable) == true)
{
return 100;
} else {
return false;
}
Your "Intersects" is backwards.
**EDIT: Also, it returns a featureset, so you need to do a count. updated the code
Also, please post code as a code sample(use javascript for arcade).
var fibercable = FeaturesetByName($datastore,"attributeruletest.sde.fibercable", ['*'], true);
if(Count(intersects(fibercable,Geometry($feature))) > 0)
{
return 100;
} else {
return false;
}