I'm using a simple Arcade expression to return what I thought would be an single intersecting parcel polygon when a gravity main line feature was clicked on. In my short sightedness I hadn't realized it's possible for that gravity main line to exist across two parcels.
This is what I thought it would always return:
It turns out though I can get something like this where both parcel numbers are returned and it looks messy:
Is there a way I can format my return statement to display multiple parcels separated by a comma?
Here's my code:
var parcel = FeatureSetByName($map, 'Parcel Boundary')
var parcelID = Intersects(parcel, $feature)
var parcel_details = ''
for(var row in parcelID) {
parcel_details = parcel_details
+ row.PARCEL_ID
}
return parcel_details
Solved! Go to Solution.
Nevermind, figured out a solution after playing with it for a few minutes.
var parcel = FeatureSetByName($map, 'Parcel Boundary')
var parcelID = Intersects(parcel, $feature)
var parcel_details = ''
for(var row in parcelID) {
parcel_details = parcel_details
+ row.PARCEL_ID + " "
}
return parcel_details
Looks like I just needed to add a space after the Parcel_ID
Definitely multiple answer here too. Stacking the labels with
TextFormatting.NewLine
in place of the space works nicely too.
Nevermind, figured out a solution after playing with it for a few minutes.
var parcel = FeatureSetByName($map, 'Parcel Boundary')
var parcelID = Intersects(parcel, $feature)
var parcel_details = ''
for(var row in parcelID) {
parcel_details = parcel_details
+ row.PARCEL_ID + " "
}
return parcel_details
Looks like I just needed to add a space after the Parcel_ID
Definitely multiple answer here too. Stacking the labels with
TextFormatting.NewLine
in place of the space works nicely too.