My model iterate through many shapefiles:
First it checks if, the field I want to add (model parameter), already exists in the table (check if the field name is the same).
If it doesn't exist:
- Great! Just add the field I want.
If exists:
- Creates a temp field
- Store the the value from the existing field in the temp field
- Drop the existing field
- Create the field I want, the way I want (string, with exactly 137 length)
- Copy the values from the temp field to the new field
- Drop the temp field
It works perfectly, always. As many shapefiles I want.
The problem is I want to run it several times, checking for a lot of fields, in a single run in the tool.
If I try to bath it, doesn't work. And if I try to put 'List of Values' in the first parameter 'Multiple Value' it gets error, because model builder doesn't allow both 'model iterator' and 'list of values' working together.
Can you guys help me?