In the FeatureSetByName() function, the "drop" is in the wrong place. Is this a field or is this the value of Cable_Category you want to count?
Also, trying to return "error" (a string) for an integer field will give you an error. If your field is a string field, it will work, though.
if you want to reject the edit when there are no intersecting lines, you can return a dictionary with the key errorMessage.
So, assuming "Drop" is the value you want to filter and you want to reject the edit if the point doesn't intersect any lines:
var cable = FeatureSetByName ($datastore, "CableDD", ["Cable_Category"], true)
var cableDrop = Filer(cable, "Cable_Category = 'Drop'")
var intersectLayer = Intersects(cableDrop, $feature)
var cnt = Count(intersectLayer)
if (cnt > 0) {
return cnt
}
return {"errorMessage": "No intersecting lines"}
Have a great day!
Johannes