We are getting errors for fields with Arcade calculated attributes after the Field Maps 2025.2 update. It appears to only affect expressions that use the $originalFeature variable. The error message is vague: "10 attributes failed". Was there anything in the latest update that would cause this? Thanks
Edit: Esri has determined this is a bug. BUG-000179854, Description: The $originalFeature function fails when creating a new feature in ArcGIS Field Maps version 25.2, but editing the existing feature is successful.
@IngridHogle Can you elaborate on your first Arcade issue? Maybe provide an example? I am having a similar situation. Post update I had two issues, both exclusive to Field Maps (all worked fine the web maps). The first was with editing the form in the Field Maps designer...I got generic error messages saying it couldn't be saved because there as a problem. I removed all of the fields from a group a and re-added them and that fixed it.
My second issue, which your post might speak to, involves an if/else statement to declare a variable in a pop-up. It uses html and works just fine in the web map as-written, but with certain templates it shows an error for the pop-up in Field Maps. It's generic (ArcGIS.InvalidCallError error 1), but I've narrowed it down to the logic around declaring a variable.
@SFM_TravisBott , I have not yet tackled the pop-up errors we're getting, since they are not actually causing problems. So I'm not sure this will be helpful. My issue with $originalFeature was that I had superflous lines of code in my Arcade scripts, double-checking that no $originalFeature existed when edit context was INSERT, for example. Removing these resolved the issue.
My original code (works in 25.1.0)
My recommendation is to test whether the feature geometry has changed in comparison to the field values.
var fx = $feature.UTM_X
var fy = $feature.UTM_Y
var G = Geometry($feature)
if( G.x != fx && G.y != fy ){
return { result: { attributes: Dictionary('UTM_X',G.x,'UTM_Y',G.y) } }
}
/*
Note: the code above will update both fields with the changed values if
there are values that have been updated in the field.
*/
That way it will only need to compare the latest changes to the geometry change. If there is a change it will update accordingly.
We are getting this issue in any Arcade calculated expressions within Field Maps Designer that call $originalFeature at any point (which is quite a few of them). The issue can be completely isolated from any other intrinsic functions/variables.
Arcade exceptions are thrown whenever $originalFeature is referenced, including something as simple as
var test = $originalFeature;
and nothing else in the expression.
Can you try putting your expression inside an edit context condition like this (filling in an existing attribute for what I named value)?
I did try wrapping any calls to $originalFeature inside of a check for an UPDATE context, but that didn't seem to resolve the error. The code:
if ($editContext.editType == "UPDATE")
{
var test = $originalFeature;
}
return false;
It does make sense to me that the variable would only be non-null and accessible outside of an INSERT context, but even an explicit wrapper for an UPDATE state produces the same error:
[ARCADE] Expression failed to evaluate:
Name: expr9
Error: invalidArcadeExpression(details: "Arcade evaluation error. Evaluation_error_code::field_not_found Line: 1")
I've never seen $originalFeature used by itself, so this is out of my league. I always use $originalFeature.something to get some information about the original feature, such as an attribute value, shape area, shape length, or x/y coordinate.
We are also using it in that context, specifically to assess whether or not users have selected a different dropdown menu option. The example was just to simplify it as much as possible.
Regardless of whether or not we are calling $originalFeature.attribute or even just $originalFeature on its own, the error persists. Any calls to $originalFeature in any context are what is causing the bug.
Roger that. Good luck! I feel lucky I was able to get all of my Arcade expressions working in 25.2.0 by just cleaning them up a bit last night. There have been no phone calls from the field today. Phew!
Feel like I'm going crazy a bit. Had seen this thread so though it might be related
Suggests there was some temporary performance hiccup but there's no other indications e.g. everything worked fine on 25.1, ArcGIS Online, and 25.2 when interacting with the layer outside of creating a new feature.
Logs have one line but it's not super helpful
8/10/25, 2:44:07 pm [SNAPPING] NOT activating snapping because not editing any features yet or it's disabled
8/10/25, 2:44:07 pm [LOCATION] Stopping location provider
8/10/25, 2:44:07 pm [LOCATION] Unregistering request MainMapViewModelImpl
8/10/25, 2:44:04 pm [ARCADE] FeatureFormViewModel.evaluateExpressionsAndUpdateUI() - Cancelled, not updating FeatureFormItems
8/10/25, 2:44:04 pm [SNAPPING] NOT activating snapping because not editing any features yet or it's disabled
8/10/25, 2:43:34 pm [REFRESH TASK] Cancelled refresh task request for identifier: com.esri.fieldmaps.task-list
8/10/25, 2:43:31 pm [REFRESH TASK] Successfully scheduled refresh task for identifier: com.esri.fieldmaps.task-list
8/10/25, 2:43:29 pm [SNAPPING] NOT activating snapping because not editing any features yet or it's disabled
8/10/25, 2:43:29 pm [AUTHENTICATION] Removing Handler: Cancel Handler: Load Map Items-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
8/10/25, 2:43:28 pm [TASKS] Notification permission denied: wasPreviouslyDenied - true
8/10/25, 2:43:28 pm [LOCATION] Starting location provider
8/10/25, 2:43:28 pm [LOCATION] Registering request MainMapViewModelImpl
8/10/25, 2:43:28 pm [TASKS] Created tasks capability
8/10/25, 2:43:28 pm [AUTHENTICATION] Removing Handler: Cancel Handler: Load Map-AB3B726C-BB72-442B-AFB4-F3AD60BD19A8
8/10/25, 2:43:28 pm [LOADING] Loaded map xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
8/10/25, 2:43:28 pm [MAP TOOLS] Not creating IPS, no indoor positioning definition
8/10/25, 2:43:28 pm [SPATIAL UNIT] Not creating SpatialUnitCapability
8/10/25, 2:43:28 pm [GEOTRIGGERS] Geotrigger count: 0
8/10/25, 2:43:22 pm [AUTHENTICATION] Adding Handler: Cancel Handler: Load Map Items-1CDA0110-5B15-415D-A944-D4D355EDE675
8/10/25, 2:43:21 pm [AUTHENTICATION] Adding Handler: Cancel Handler: Load Map-AB3B726C-BB72-442B-AFB4-F3AD60BD19A8
8/10/25, 2:43:07 pm [MAP] Failed to provide map: noMaps
8/10/25, 2:43:03 pm [PORTAL] URL: https://www.arcgis.com Mode: AGOL Version: 2025.2.0