Feature Class iteration in FGDB using AddField tool

Discussion created by OZGeo on Oct 18, 2011
I am trying to set up a model to add six new fields to a feature class in a file GDB and iterate through all feature classes in the GDB. I have set up the model which works with a single feature class, however when I try to setup the iterator to run through all FC in the GDB it creates the 6 new fields in the first FC it loops through, the first field in all the other FC and returns error messages that field already exists when looping through the rest of the process.

I think the problem may lie with how the iterator is defining an output FC name and is attempting to reuse the name of the first FC it has successfully run through, instead of using the name of the new FC is is looping through. There is no way I see to change this behaviour, as the output FC name is not user configured.

Any suggestions as to how I can force the model to change the output FC name to match the input FC name?