So I have an intersect expression that simply takes a single field I care about from a layer and includes it in the pop up of the layer on top. However, there isn't always going to be an underlying polygon when the top layer is selected. As of right now it just leaves that field blank in the pop up. I would like it to display "Not in the Renewable Energy Overlay" when there is no layer to intersect. Would I use an IF statement or an IIF or maybe an IsEmpty statement and what would the syntax be?
My current simple intersect expression:
var Overlay =FeatureSetByName($map,"Renewable Energy Overlay");
var feature_buf=Buffer($feature, -25, 'feet');
var IntersectLayer=Intersects(Overlay, feature_buf);
for (var r in intersectLayer){
return r.EnergySour
}
All of the examples I have found deal with numbers or calculating number fields, etc. but the field in question is a text field. I am sure I am just confusing myself by way overthinking and complicating this. I'm still trying to figure out and understand how to create expressions with more than 1 function.
Thank you for any help,
Derek