Hello!
I have a small Arcade expression I'd like to use in a field map. It takes a feature set from the map, which is filtered from a broader feature service, and generates a "custom" id for any newly added feature.
var POI = $feature.POI_ID
if (POI != null) {
return POI
} else {
return "POI " + (Count(FeatureSetByName($map, "Point of Interest"))+ 1)
}
This expression works as intended on ArcGIS Online in the Web Map Viewer. However, when using this expression in the field map, the feature set is not generated in relation to the features on the web map, but the entire feature service itself. So if there are five Points of Interest on the map, but 40 in the feature service, it will generate POI 41 as the POI ID. I've seen others have issues with the FeatureSetByName function in field maps, however none of the solutions seems to particularly pertain to this case. Let me know if anyone has any suggestions, or if this may just be an Esri bug.