I'm trying to merge feature classes, that come from a submodel ("PFA_findBiggest") via inline variable substitution. They are saved in a GDB.
They all have different fields. I want to merge them into one big table according to a fishnet_FID, that they all carry.
Here you can see, I tried the merge function in order to merge them into a feature class, but this didn't work. It only ever 'merged' the first %n%, which of course is 0, and nothing else. So the output of Merge is identical to the first layer processed.
I guess it's because Merge doesn't know that more is coming. That's why I have put the "Collect Values"-Tool in between. It is set to the the output of the submodel, including the %n%.
I got it to work by placing the "Collect Values" Tool inside the submodel, as described. But it seems merge is not the right tool yet. It only adds the rows of each feature class together.
How do I use the FID that all feature classes have, to connect the data?
I tried Join Field instead of Merge, but ModelBuilder only lets me connect the output of Collect Values to Join Field as Precondition.
Or maybe there is a tool, that I can use after merge, to shrink the table according to the FID?