Model Builder

282
1
01-17-2019 11:57 AM
RichardTruong
New Contributor III

Is there a simple method in ModelBuilder to populate/field calculate several different fields from other different fields all resided in a same feature class.  For example, I would like to field calculate from field call F1 to F1A, from F2 to F2A, from F3 to F3A and so on so forth.   All fields format are exactly identical, exception to the name of the fields.  From ModelBuilder I use the 'Calculate Field', unfortunately, there are over 200 fields for this feature class, and using Calculate Field option for each field can take forever to setup.   Is/are there any simple options from ModelBuilder to create for this type of repetitive task? Attached if the long method of Calculate Field.   Thank you in advance.

0 Kudos
1 Reply
curtvprice
MVP Esteemed Contributor

You could create a submodel that iterates a list of fields.

However, because there are so many fields to copy, I think it would be best (and far more efficient) to use Calculate Value with a Python function that copies the data over with an update cursor (arcpy.da.UpdateCursor) in a loop. I realize this is a little advanced but I think it's the best approach.