Erro
| Número de ID do Erro | BUG-000176361 |
|---|---|
| Enviado | May 12, 2025 |
| Última Modificação | October 15, 2025 |
| Aplica-se à | ArcGIS Field Maps |
| Versão encontrada | 25.1.0 |
| Sistema Operacional | N/A |
| Versão do Sistema Operacional | N/A |
| Versão Fixa | 25.2.6 |
| Status | Fixed |
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 do Erro: BUG-000176361
Software:
Obtenha ajuda de especialistas do ArcGIS
Baixe o Aplicativo de Suporte da Esri