laptop and a wrench

Bogue

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.

Dernière publication: June 7, 2022 ArcGIS Pro
Numéro d’ID de bogue BUG-000147506
EnvoiMarch 10, 2022
Dernière modificationMarch 20, 2025
S’applique àArcGIS Pro
Version trouvée2.9
Système d’exploitationWindows OS
Version du système d’exploitation10.0
StatutNon-Reproducible

Informations supplémentaires

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

Solution de contournement

Use an update cursor.

Étapes pour reproduire

ID de bogue: BUG-000147506

Logiciel:

  • ArcGIS Pro

Recevoir une notification lorsque le statut d’un bogue change

Télécharger l’application Esri Support

En savoir plus sur ce sujet

Obtenir de l’aide auprès des experts ArcGIS

Contacter le support technique

Télécharger l’application Esri Support

Accéder aux options de téléchargement