I have created a model to iterate through a dataset and create output CSV files based on the BirdID. I only wanted output CSV files for BirdIDs that returned a count when the 'Select by Attribute' tool was run. This runs correctly and in my output folder there are only outputs for ones that have counts, however when I introduce the 'Collect Values' utility and give it the same precondition of count, it collects the value of CS3_1.csv every time, even though that is not a CSV output generated during 'Copy Rows' because it does not have a count associated with it. Any suggestions how to fix this issue? I surmise it has to do with the output names being codes back to %BirdId%.
This model is going to be a submodel that feed into a merge and so having the Collect Values collect essentially a non-existent value causes the Merge tool to fail.