I am currently building a model to help speed up part of the generation of a map I make occasionally for the Dept of Public Works I work with. I have the majority of the map already made and saved in an .mxd. What I'd like to do is be able to open the model, run it and it adds the extra two new layers built from other existing layers and then have the completed map.
Manually what is being done is this: I have the point layer Water_Breaks_1997_to_Current, which I run a Select by Attribute SQL search to remove approx 100 results that are in the layer but no longer needing to be mapped. This result is then saved as a new feature class Water_Breaks_on_Active_Line_DATEHERE. Then right clicking my other layer representing water mains know as wMain (line geometry), I execute a spatial join where the layer wMain to the newly made Water_Breaks_on_Active_Line_DATEHERE. A points to line with one to many cardinality. Then summary statistic it by having each line intersecting a point(s) get a SUM count of said points, so that I can symbolize the new feature class to show the count of which water mains have the most breaks occurring on it in the city.
The problem that is occurring in the model is the spatial join. When opened, it does not offer spatial statistics the same way as right clicking the feature class itself. But through searching older SE questions and geonet, I came up with you have to add a new field, right click for merge rule and I select the 'Sum' ability.
At this point, I've validated the model, and run it in Edit mode multiple times. Each time it does everything I wish...except the summary statistic of the amount of points on each line. It shoots out a field populated full of 0 each time.
What step or option am I missing that is stopping this from being counted properly?
Using: ArcGIS 10.2.2