Hello,
I want to do something very similar to this, but I can't seem to get it working. My model selects a feature in a source layer, then uses "select layer by location" to select features from a target layer that have their centroid within 0.5 miles of the source layer. I then use "summary statistics" to sum over one field (in this case population) and "get field value" to grab that value.
The problem I'm running into is creating a table from these values. I want to ensure that the calculated value is added to the correct record. So I created a dBASE table from the "PhaseICorridorsSplitTesting" layer and named it "LandUseAnalysis". I'd like to select the same record in the "LandUseAnalysis" table as was queried in the "iterate feature" function (using the FID/OID fields). I'm then using "Value (2)" as an in-line variable into the "calculate field" (though I'm not sure if this part is working since the tool stops before it reaches this point).
It looks like that is what you are doing here, but I keep getting an "invalid SQL expression" at the "Select Layer by Attribute" tool. I've tried pretty much every combination: "OID" = '%Value%', "OID" = %Value%, no percent signs, etc. So, I guess my question is, what am I doing incorrectly, and what's going on behind the scenes of the model that you eventually got working?
I have some programming experience but am pretty new to model builder.
Thanks!