Reclassifying Values in a Text Field

Discussion created by tkoritan on Sep 28, 2011
Latest reply on Sep 28, 2011 by tkoritan
Hello all,

I am trying to reclassify a text field that was populated with values from a numeric field.  The numeric values represent riparian setback buffer widths, and I would like the reclassified values in the field that I am calling "SetbackType" to be more descriptive.  So instead of having a value of just "25" I would like the field value to contain the string "25 ft setback".

I found a block of code from the ArcGIS 10 help to reclassify a field, there are no errors in the code that prevent the script from running, but after it has run in the field calculator, the values for the "SetbackType" field have not changed.  Any thoughts on what the problem might be? 

Here is the code I am using.

def Reclass(SetbackType):
  if SetbackType == 25:
    return "25 ft Setback"
  elif SetbackType == 75:
    return "75 ftSetback"
  elif SetbackType == 120:
    return "120 ft Setback"