I have a model that iterates through a series of neighborhood polygons and clips several different datasets using the iterated neighborhood polygon. I am trying to determine the number of features that lie within the polygon and record these values to a table. So, my model clips the input layers (bike lanes, for example) to the shape of the neighborhood, counts the number of features using "get count", then uses "calculate field" to write these values to the table.
I obviously need the "get count" tool to execute before the calculate field tool, because I am using the row count as an inline variable for the field calculation. However, when I run the model, it does the field calculation BEFORE the get count tool runs. This makes my data useless.
I tried using a precondition to set the order of the model, but if there are no bike lanes in the neighborhood, the precondition kills the rest of the calculation because of the zero value instead of just writing the 0 value to the table and moving on (The process did not execute because the precondition is false). I cannot figure out how to control the order of the model without using a precondition. Can somebody tell me what I'm missing here?
Here is the section of my model that is breaking. In the actual model there are a lot of different clips that go on, and the model goes through all of the clips in the model, THEN to my Calculate Field, THEN to my Get Count.