I am attempting to set a newly created field based on the strings in another field 'TNMFRC'. I am pretty sure that I have the code write, and yet everything is set to a value of '6'. Here's my code:
def myCalc(road): if road == "Local Road": return 1 elif road == "Controlled-access Highway": return 2 elif road == "Secondary Highway or Major Connecting Road": return 3 elif road == "Ramp": return 4 elif road == "4WD": return 5 else: return 6
and in the other box:
Can anyone see what I might be doing wrong? I can't figure it out.
EDIT: So even though the field appears to be as string based field, it seems in the properties to be listed as a long integer numeric field?