laptop and a wrench

Bug

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".

Zuletzt veröffentlicht: March 9, 2023 ArcGIS Pro
Bug-ID-Nummer BUG-000156393
EingereichtMarch 7, 2023
Zuletzt geändertJune 5, 2024
Gilt fürArcGIS Pro
Gefunden in Version3.1
BetriebssystemWindows OS
Betriebssystemversion10.0 64 Bit
StatusAs Designed

Zusätzliche Informationen

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

Workaround

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.

Schritte zur Reproduzierung

Bug-ID: BUG-000156393

Software:

  • ArcGIS Pro

Benachrichtigung erhalten, wenn sich der Status eines Bugs ändert

Esri Support App herunterladen

Weitere Informationen zu diesem Thema erkunden

Unterstützung durch ArcGIS-Experten anfordern

An den technischen Support wenden

Esri Support App herunterladen

Zu Download-Optionen wechseln