I am using ArcGIS Pro 2.8 to build an attribute rule for a point feature that will count the lines of another feature class intersecting each point. Seems easy enough but I need it to count only certain lines. We have a model to do this in post processing but I would like to move this to our live data editing.
I can get a valid expression for counting intersecting lines until I try and add the query. Is there a way to call only the lines of my feature that match certain attribute. Sample of one of my failed attempts below.
var cable = FeatureSetByName ($datastore, "CableDD", ["Cable_Category"], 'Drop')
var intersectLayer = Intersects(cable, $feature)
var cnt = Count(intersectLayer)
if (cnt > 0) {
return cnt
} else {
return "error"
}