laptop and a wrench

Bug

The $originalFeature function fails during feature creation in ArcGIS Field Maps version 25.1.0, while editing existing features is successful.

ArcGIS Field Maps
Bug ID Number BUG-000176361
SubmittedMay 12, 2025
Last ModifiedOctober 14, 2025
Applies toArcGIS Field Maps
Version found25.1.0
Operating SystemN/A
Operating System VersionN/A
StatusUnder Consideration

Workaround

During feature creation, $originalFeature is often null because no original feature exists yet. Since $originalFeature is not available at the time of feature creation, avoid using it in expressions intended for initializing new features. Instead, use $feature.

To handle this correctly, create separate attribute rules for feature creation and feature editing. Use $originalFeature only in rules that apply to feature updates.

Additionally, ensure to check for null values before referencing $originalFeature.

It is recommended to differentiate between feature creation (INSERT) and feature editing (UPDATE) using $editcontext.editType.

 

if ($editcontext.editType == 'INSERT') {

 return 'New'

} else if ($editcontext.editType == 'UPDATE' && $originalFeature.status == 'Complete') {

 return 'Revisit'

} else {

 return 'New'

}

if ($editcontext.editType == 'INSERT') {

 return 'New'

} else if ($editcontext.editType == 'UPDATE' && $originalFeature.status == 'Complete') {

 return 'Revisit'

} else {

 return 'New'

}

 

With a null check for safety:

if ($originalFeature == null) {

 return 'New'

} else if ($originalFeature.status == 'Complete') {

 return 'Revisit'

} else {

 return 'New'

}

Steps to Reproduce

Bug ID: BUG-000176361

Software:

  • ArcGIS Field Maps

Get notified when the status of a bug changes

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options