I want to calculate auto increment a field name by group order Column "ID" into column "Name" in ModelBuilder and my input is shapefile.


enter image description here


1 Answer 1


This can be achieved with a simple model and copying some prepared code from the help file.

Here is an input table, note that the ID column values are not necessarily sequential.

Sample data

The model is:


The iterator is grouping by the ID field and the calculate field tool is set up as:

Tool set up

The code is found on the help file here

The final output is:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.