Hello,
My Problem: I wanted to use an Attribute Rule on my Address layer (APN field) to intersect the Parcel layer and return the APN field with the proper feature.. The problem I am running into, is that the Parcel layer has overlapping polygons in some area and my logic can only figure out how to return the 1st intersect.
My Goal: To use a attribute rule that intersects the Parcel & does something similar to the logic below:
for Parcel.APN
if Parcel.Unit is not null
if Address.Unit == Parcel.Unit
return Parcel.APN
else return First on Parcel.APN intersect.
I am not sure add this functionality into my script.
I am able to get the return first using:
var fsParcel = FeatureSetByName($datastore, "Parcel", ["APN"])
var fsParcelIntersect = Intersects(fsParcel, $feature)
var Parcel = First(fsParcelIntersect)
return Iif(IsEmpty(Parcel), Null, Parcel.APN);
But am lacking the logic and understanding to include an if statement that works.
Any help would be appreciated.