laptop and a wrench

漏洞

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

ArcGIS Field Maps
漏洞 ID 编号 BUG-000176361
已提交May 12, 2025
上次修改时间October 14, 2025
适用范围ArcGIS Field Maps
找到的版本25.1.0
操作系统N/A
操作系统版本N/A
状态Under Consideration

解决办法

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'

}

重现步骤

漏洞 ID: BUG-000176361

软件:

  • ArcGIS Field Maps

当漏洞状态发生变化时获得通知

下载 Esri 支持应用程序

发现关于本主题的更多内容

获取来自 ArcGIS 专家的帮助

联系技术支持部门

下载 Esri 支持应用程序

转至下载选项