AnsweredAssumed Answered

Naming output feature classes so they do not get overwritten

Question asked by ian.irmischer on Sep 18, 2020

Hi, I have 10 buffers and 30 years of events (point data)(3 in this model). I am trying to create separate feature classes that count the number of events intersecting with each buffer. I am iterating over the buffers and using a batch spatial join for each of the years events. 


the problem is that each buffer overwrites the previous feature classes.  So lets say I have 10 buffers and 30 years of events. Then I would expect to get 300 output feature classes. But I only get 10 feature classes. They are the spatial join of the each buffer and the last year of the batch (instead of every year of the batch). I tried using the %Name% convention but it just names it the buffer name. %n% doesn't work either. Thoughts?