I have a field that calculates the number of photos/attachments a point has in Field Maps. I was just notified of an error that is showing up, preventing users from recording data. My latitude and longitude arcade expressions however, seem to be working just fine? This only seems to be impacting offline maps.
The field is calculated and read only and the arcade script is
Count(Attachments($feature))
Hey @luckachi
If I'm correct, ArcGIS Field Maps uses the feature service to contact and read the attachments from the layer, which is more than likely what is causing your calculation to fail, since it's reaching out to the feature service through a request, it's failing as if it's online:
https://developers.arcgis.com/arcade/function-reference/featureset_functions/#attachments
"Only applicable to features originating from a feature service" and "fetch" in types tell me that this requires some connectivity.
Cody
I took a look, it does work for existing features that are taken offline. The count does not update as attachments are added or removed. It only returns the count of existing attachments when one starts editing the feature.
I also noticed It is not working for new features that are created whether online or offline. I see an error using the MapViewer while connected for calculating a field equal to Count(attachment($feature)) Potentially in the feature creation process the "attachment info" is not fully there until the new feature edit is finished?
One difference, MapViewer will let you create the feature (submit), when there is an Arcade error. Field maps will not let you submit the feature with this error.
If you can log an issue with Tech Support for this, it will help.
thanks,
Mark