HOW TO
In ArcGIS Pro, the Calculate Field tool can be used to perform calculations on all or selected records using Python expressions. This article provides the workflow to concatenate increment numbers and an existing text field using Python.
Note: This step can be skipped to populate the calculation output to the existing text field.
str(!Field Name!)+" "+str(autoIncrement())
Note: Do not remove the exclamation marks surrounding the field name. Remove the double quotation marks (" ") to eliminate the space if required.
rec=0 def autoIncrement(): global rec pStart = 1 # adjust start value, if req'd pInterval = 1 # adjust interval value, if req'd if (rec == 0): rec = pStart else: rec = rec + pInterval return rec
Article ID: 000026359
Get help from ArcGIS experts
Download the Esri Support App