Hello, I'm looking to create a model that breaks a single feature class into multiple feature classes based an attribute value and then looks for a feature class name and alters fields names, deletes unnecessary fields, and renames the feature class. I've created a model that creates the feature classes and also created a model that alters fields, deletes fields, and renames the feature class. I'm looking to create one model, so basically, after the first model that creates a gdb with multiple feature classes, i think i need something like an IF statement where: if feature class name == XXX run model two that alters fields, delete fields, and renames the feature class based on the specefic feature class name.
Below are examples of the two models, right now each feature class would have to be it's own model to alter, delete, and rename because the input parameter is required and the gdb created in the first model may have all or only some of the feature class names. Is there a way to iterate through a gdb and look for a specific feature class name? any help would be appreciated.
The output of the split by attribute tool is a workspace as stated in the syntax section of the help file. You need to create a sub-model with a featureclass iterator and place your other models (or their contents) into the sub-model. Then connect that sub-model to the output of the split by attributes tool which is in the master model. You'll need to expose inputs/outputs as parameters to allow them to connect, that is all discussed in the help file.
Thanks for the reply Duncan. I've tried setting the first model as a precondtion then using the created gdb and iterate feature class. However, the alter fields tool has a required input parameter so i'm getting an error when it is trying to run saying it is invalid. I've tried using inline variables as a place holder but no luck.
Whenever I have run into intractable tool validation issues I have accessed the tool using the Calculate Value tool with a python function. A little Python goes a long way in Model Builder!