laptop and a wrench

Bug

Using a GetParameterAsText variable in an ArcGIS Pro calculated field code does not return the correct result of the output and does not recognize the isSame function when running through the script tool.

Zuletzt veröffentlicht: June 7, 2022 ArcGIS Pro
Bug-ID-Nummer BUG-000147506
EingereichtMarch 10, 2022
Zuletzt geändertMarch 20, 2025
Gilt fürArcGIS Pro
Gefunden in Version2.9
BetriebssystemWindows OS
Betriebssystemversion10.0
StatusNon-Reproducible

Zusätzliche Informationen

The CalculateField tool requires the field names within ‘!’. The user's script misses the '!'. The following code works: exp = "isSame(!{}!,!{}!)".format(Field1, Field2) arcpy.management.CalculateField(LayerComp, MatchField, exp, "PYTHON3", codeblock, "TEXT", "NO_ENFORCE_DOMAINS")

Workaround

Use an update cursor.

Schritte zur Reproduzierung

Bug-ID: BUG-000147506

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