I am essentially trying to do what is listed in this question:
Renaming field via ModelBuilder?
So I am trying to use the Add field > Calculate Field > Delete Field method listed but the problem is my field names keep changing as they are based on an ID (%Value%) in my model so I can't just do
[NewFiled]=[OldField]
Instead I need to do something like
[NewField]= [OldField %Value% +3 ]
However I'm not sure if this is possible to do a calculation within a field name.
Below is the long version:
I have a model (see below) that creates a number of different shapefiles that are named "School_%Value%" where %Value% can be a number from 1 to 797 (I only have 121 shapefiles but their values fall within that range).
Because of the join that occurs half way through the model all the field names get renamed, and because the ID is numeric each field gets iterated so if the Shapefile "School_1" had columns Name, Date, Address, they become School_1, School_2, School_3. If my shapefile "School_100" had the same three columns they will be School_100, School_102, School_103.
I at least know the column I need to change is always the last one, so the name will always be %Value% + 3, but I'm not sure how to do arithmetic in a field value in the calculate field tool.