How to merge tables at the end of an iteration?

2262
15
10-05-2018 05:28 AM
SerenaFraccascia
New Contributor II

I am running a model iterating through N feature clases and I get N tables as output. The model works properly. Here it is:

I need to merge this tables into a new one, thus I would run my model as submodel. However, when I add it to the new model something goes wrong:

I am still learning modelling and programming skills, thus any help, suggestions, clarifications are more than welcome!

Tags (2)
0 Kudos
15 Replies
DuncanHornby
MVP Notable Contributor

Yes what is it set to?

0 Kudos
SerenaFraccascia
New Contributor II

It is the directory where the folder 'points' (see first fig in the original post) is located. I need the model to be the most general possible, as I have to share it with other colleagues.

0 Kudos
DuncanHornby
MVP Notable Contributor

OK I needed you to tell us this as from that screen shot it could have potentially been a file geodatabase workspace and you cannot have a ".dbf" at the end of a file geodatabase table.

Looking at the model it seems OK to me so all I can suggest is you replace the table name from 'out_stats_%N%.dbf' to 'out_stats_%Name%.dbf' where %Name% is coming from the iterator. I suggest this as I am guessing that %n% never increments with an iterator?

0 Kudos
SerenaFraccascia
New Contributor II

It seems it doesn't solve the problem. By the way %n% works fine when I run the first model alone.

0 Kudos
DuncanHornby
MVP Notable Contributor

OK I am all out of ideas I would need the data and model to solve this.

0 Kudos
SerenaFraccascia
New Contributor II

Thanks anyway! 😉

0 Kudos