I am trying to rename a field using Field Map in Feature Class to Feature Class tool, using inline variable, but it is not working, I want to add the base year at the end of the field name, in the output feature class, for example in this case I want to rename the field from 'BASIC' to 'BASIC_18'
Base year can be different for each area so I have it as a variable and a model parameter, to be entered by the user.
Here is how I have set it up in the model
I tried with and without quotes %BaseYear%, but still it is not adding it.
Because these field maps are handled at validation time, not at run time, the approach you really need to do is to use the Calculate Value tool to generate a field map dynamically at runtime using the arcpy FieldMappings objects in a Python function. Re: Generalizing Fieldmaps in ModelBuilder