Using Get Count's result to populate a field in Modelbuilder

06-29-2015 12:54 PM
New Contributor


I'm trying to use the Get Count command in a Modelbuilder to populate an empty field via Calculate Field command. But, Modelbuilder will not let me directly connect Calculate Field to Get Count. I'm really not sure what else to do besides simply do all the calculations manually.

More specifically, I'm trying to find the parcel number per road in my municipality. I want to create the ModelBuilder to run through each street name, select the parcels within 40 ft of the road name, use Get Count to calculate the total of these parcels, and then field calculate the total number for the respective street. I have added a picture of my Modelbuilder to help you understand where I'm at. modelbuilder.jpg

1 Reply
Regular Contributor II

You'll need to use inline variable substitution. You can set the Get count result as a precondition to the calculate field tool and then use inline variable substitution to supply the output input as the expression in the calculate field tool.

Examples of inline model variable substitution.