ABTurner13

If/Then statement in Model Builder

Discussion created by ABTurner13 on Aug 1, 2012
Latest reply on Aug 1, 2012 by LDanzinger-esristaff
I am new to using VBA/ Python and am trying to write an if/then code. In model builder, I am trying to write an If/Then statement for a newly created field. I want to populate the newly added field by stating the following in the Calculate Field tool:

For this new field [C]
If the value of an existing field [A] is greater than 75
Then the value for this new field [C] should be 1
If the value of an existing field [A] is less than 75
Then the value for this new field [C] should be 0

Also, I have added another field and I would like the field to be populated like this:

If the value of the existing field [C] is 1, take the value from the existing field [B]
If the value of the existing field [C] is 0, take the value from the existing field [D]

I have searched the forums and cannot find anything to help me complete this task. Thank you in advance for any help or support you can provide.

Outcomes