AnsweredAssumed Answered

Need Help with Python Syntax

Question asked by alantoms on Feb 24, 2012
Latest reply on Feb 29, 2012 by alantoms
Hello folks,

I need help with the proper syntax. I'm sure it's easy I just cant get it.  Basically it's telling me that the syntax for my return value, Str(!SHIELD_VAL!), is invalid.  I'm using a field calculator to run a check on field HWY_Type and given certain values, it will populate field FEDROUTE with the value of SHIELD_VAL.  Any help would be appreciated.

Thank you
Alan

def FedRoute(tvalue):     value = tvalue     if value == 'INT':         return Str(!SHIELD_VAL!)     elif value == 'US':         return Str(!SHIELD_VAL!)  FedRoute(!HWY_Type!)

Outcomes