I'm trying to write an Arcade expression that does the following. If a line is within the boundary of another poly layer, the line takes the name attribution from the boundary, but only if the line is of a certain type. So far we have this which does the first part.
var OLT = FeatureSetByName($datastore, "Proposed_OLT_LCP_Boundaries",["cab_id"], true)
var intersectLayer = Intersects(OLT, Geometry($feature))
if (Count(intersectLayer) > 0) {
var layer = First(intersectLayer);
return layer.cab_id;
} else {
return null;
}
However I'm struggling with the part that only pulls in cab_id if intersectsLayer is of a certain type. Any input on this is greatly appreciated.