[GIS] Model Builder Error populating attributes with Calculate Field

arcgis-10.0field-calculatormodelbuilder

I would like to run a model that iterates over all feature classes in a feature dataset and uses the feature class name to populate an attribute field (see model below). However, when running the model I get the below error:

enter image description here

Might the problem be in the calculate field expression? It gives me the option to use "Name" from the iterator (hence the arrow connecting name to the calculate field tool). But I can't get the model to run. The resource cited here has not provided much insight.

enter image description here
thanks in advance

I also tried to split the models in two (see below). The first one executes no problem. The second gives me the same previous error above.

Adds text field successfully
enter image description here

Best Answer

Ok, the solution was very simple. Adding double quotes around the %Value% and/or %Name% variable lets model builder recognize the iterator output as an inline variable. So the Calculate field expression that worked was: "%Value%"

Related Question