Arcade - Calculate Field From Intersecting Feature

811
1
10-21-2019 12:35 PM
JoshSaad1
Occasional Contributor II

I apologize, I'm not very good with scripting/coding.  I'm trying to calculate an address point's parcel ID from an intersecting parcel using this short script:

var fsParcel = FeatureSetByName($datastore, "ParcelBoundaries", ["Parcel_Number"])
var fsParcelIntersect = Intersects(fsparcel, $feature)
var ParcelID = First(fsParcelIntersect)

return ParcelID.Parcel_Number

However, when I try to run it against 61 address points, they all come out with the same parcel ID.  I have a feeling it might have to do with the varParcelID using the First function, but I'm not sure.

Can anyone help?

Thanks.

Tags (1)
0 Kudos
1 Reply
FC_Basson
MVP Regular Contributor

You should try running the intersect on the point feature buffer geometry:

var fsParcelIntersect = Intersects(fsparcel, Buffer($feature, 1, "meter"));
0 Kudos