I want to iterate through a field of a feature class within a geodatabase in ArcGIS ModelBuilder, extracting each group to their own separate feature class within that same gdb.
I'd like to append the names of these groups to the end of the feature class name. As there are spaces and other invalid characters in many of the group names, I tried the Calculate Value tool to use Arc's ValidateTableName function to automatically replace the offending characters with underscores.
The model kind of works but I have an interesting anomaly where (as you can see above) an extra value of '1' has been added to the output 'Name' which serves as a precondition to the Calculate Value function. This results in '1' being added as an extra inline variable to the output feature names, causing a mismatch between the file names and the group upon which they were originally based.
How can I stop '1' from being added as an inline variable here?
Edit: interestingly if I remove the Calculate Values section the outputs are named correctly until it hits a group with an invalid character for geodatabases, at which point it falls over: