rgthurau

Calculate Field Script runs but does nothing

Discussion created by rgthurau on Dec 14, 2011
Latest reply on Dec 19, 2011 by rgthurau
Hi ESRI community,

I have a fairly straight forward script I'm trying to run from a Calculate Field tool in a model.

The objective is to populate Fee_Tier according to values in Fee_Class and Total_IA.

Input table is a feature class in a GDB.
Field Name: Fee_Tier
Expression: fee(!Fee_Tier!, !Fee_Class!, !Total_IA!)
Expression Type: PYTHON
Code Block:
def fee(FT, FC, TI):
  if FC == "SFR":
    if TI >= 99.5 and TI < 2000.5:
      FT = 1
    elif TI >= 2000.5 and TI < 2900.5:
      FT = 2
    elif TI >= 2900.5 and TI < 3900.5:
      FT = 3
    elif TI >= 3900.5 and TI <  7500.5:
      FT = 4
    elif TI >= 7500.5:
      FT = 5
    else:
      FT = NotImplemented
    return FT


The tool runs but Fee_Tier remains completely populated with NULL values.

I'm really tired today, so with any luck I'm just missing something easy.

Thanks!

Rich

Outcomes