I am trying to get the Feature Class name (from Iterate Feature Classes) into a new field. I have been following the models described in the following two threads.
However, whenever I run the model I get the following error message
ERROR 000539: Error running expression: CF0140r01 Traceback (most recent call last): File "", line 1, in NameError: name 'CF0140r01' is not defined Failed to execute (Calculate Field)
I have tried it using Parse Path using %Value% in the expression field (here is my model) (http://i.imgur.com/aOFgCgJ.jpg) and I have tried it with the Parse Path tool removed , entering %Name% in the Expression box for Calculate Field
I get the same error message either way
Here are two screen shots of the Feature folder
and the Calculate Field
I have tried to simplify this model (not even sure why I need the Feature Class to Feature Class tool, I just have it there because an earlier thread I was using to build this had that in it). Here is the updated, and simplified model, with the Error Message I am getting. FYI: the Expression in the Calculate Field tool is %Name%