2

I have a model that adds several fields, two which are manual inputs (County Name and User). I am manipulating several parcel layers (approx 90 counties).

In my model, one field takes the state and county ID's and (FIPS) calcs them together. The next field is a manual input of the county name (Which I enter). I want to write a if then statement in a calc value of this field from another feature.

Essentially in my parcel layer, I want the county name to automatically calculated based off the FIPS column in my parcel layer and in my county layer. So If FIPS = FIPS (From my county layer), then calc county name (in my parcel layer). Is this possible?

  • I think you'll need to join the features to accomplish this. – recurvata Jun 23 '15 at 13:43
  • You don't say which version of ArcGIS, but it sounds like you could make use of the Join Field tool here (or Add Join, Calculate Field, Remove Join): desktop.arcgis.com/en/desktop/latest/tools/… Usually, I'd use cursors for this, but you said you needed a 'modelbuilder' solution. – T. Wayne Whitley Jun 23 '15 at 13:44
  • ArcMap 10.2.1, I guess I was over thinking this. – Zack Jun 23 '15 at 14:02
1

There is a Help page called Using If-Then-Else logic for branching which I think you should review:

In ModelBuilder, if-then-else logic can be implemented by writing a script tool that tests some condition, then outputs two Boolean variables that describe the true and false condition and incorporating this script tool in a model. As an alternative to writing a script tool, you can also use the Calculate Value tool to test the condition and output a Boolean.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.