I have a county file in arcmap and trying to assign values in field calculator based on county name. I don't have experience writing scripts.
The county field is tl_2010_55_county10.NAMELSAD10
, and the new field in which I am trying to assign values is tl_2010_55_tract10.NitValue
. The type is "short".
I am in field calculator, and have the Python "code block" up:
def myValue( !tl_2010_55_county10.NAMELSAD10!, !tl_2010_55_tract10.NitValue! ):
if ( !tl_2010_55_county10.NAMELSAD10! == "Clark County"):
!tl_2010_55_tract10.NitValue! = 1
else:
!tl_2010_55_tract10.NitValue! = 0
Then, in the little box at the bottom that says: !tl_2010_55_tract10.NitValue! =
I call the function:
myValue( !tl_2010_55_county10.NAMELSAD10!, !tl_2010_55_tract10.NitValue! )
However, when I run this, it says there was a failure geo-processing.