laptop and a wrench

Error

In ArcGIS Pro 3.1, when the user-defined function is declared within a loop in the Arcade script, it returns the following error message, "Invalid expression. Function declaration only at global scope".

Última publicación: March 9, 2023 ArcGIS Pro
Número de ID del error BUG-000156393
EnviadoMarch 7, 2023
Última modificaciónJune 5, 2024
Relacionado conArcGIS Pro
Versión encontrada3.1
Sistema operativoWindows OS
Versión de sistema operativo10.0 64 Bit
EstadoAs Designed

Información adicional

Functions cannot be declared within a ‘for’ or ‘if’ statement. Declare the function outside the statement to use it.

Solución alternativa

When the user-defined functions are declared outside the loop in the Arcade script, it works correctly with no issues in ArcGIS Pro 3.1.

Pasos para reproducir

ID del error: BUG-000156393

Software:

  • ArcGIS Pro

Recibir notificaciones cuando cambie el estado de un error

Descargar la aplicación de soporte de Esri

Descubrir más sobre este tema

Obtener ayuda de expertos en ArcGIS

Contactar con el soporte técnico

Descargar la aplicación de soporte de Esri

Ir a opciones de descarga