Good afternoon,
I’m looking for a way to show the nearest parking location (point layer) when clicking on a restaurant (point layer). I’d like the pop‑up in ArcGIS Pro to display a clickable URL or an Arcade expression that zooms to the nearest parking feature. The layer restaurant already includes a NEARME field that stores the ID and distance of the closest parking point.
Tried thos code as an expression and it does not work:
var parkingOID = $feature.NEAR_FID;
if (IsEmpty(parkingOID)) {
return "No parking location found.";
}
var layer = FeatureSetByName($map, "Parking_Locations", ["OBJECTID"], false);
var parkingFeature = First(Filter(layer, "OBJECTID = " + parkingOID));
if (IsEmpty(parkingFeature)) {
return "Parking location not found in layer.";
}
// Build a link that auto-selects/highlights the parking feature
var url = "arcgis://select/?layer=Parking_Locations&objectid=" + parkingOID;
return "Select Parking Location: " + url;
I don't know of a usuable workflow to do this in ArcGIS Pro, but I definintely know how to do this in ArcGIS Experience Builder. Perhaps others will chime in with assistance.
Hey, your logic looks fine but the issue is that ArcGIS pop-ups don’t really support links like that in most cases. Instead, try using a feature action or configure the pop-up with a related record or custom attribute display rather than forcing a URL. Also double check your layer name in FeatureSetByName matches exactly, that breaks things a lot. If you just want zoom/highlight, setting up a selection action in the map might be a cleaner way than Arcade.