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.

Last Published: June 7, 2022 ArcGIS Pro
Bug ID Number BUG-000147506
SubmittedMarch 10, 2022
Last ModifiedMarch 20, 2025
Applies toArcGIS Pro
Version found2.9
Operating SystemWindows OS
Operating System Version10.0
StatusNon-Reproducible

Additional Information

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.

Steps to Reproduce

Bug ID: BUG-000147506

Software:

  • ArcGIS Pro

Get notified when the status of a bug changes

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options