Help Calculate field based on values in another field

Discussion created by rgthurau on Aug 31, 2011
Latest reply on Sep 1, 2011 by rgthurau
Sorry to drop this on the community, but i can't seem to find a suitable example

My target field is ???PRG_Parcel???.
I???m trying to write a function called ???answer??? that will return text to ???PRG_Parcel??? based on values in the ???Taxable??? field.

Input Table: table
Field Name: Field_Name
Expression: answer()
Exp. type: Python
Code Block:
def answer(!Taxable!)
  if Taxable > 20000:
    return "'Y'"
    return "'N'"

I've tried to do things a few different ways. Would anyone be so kind as to explain how I should be writing this code?

Thanks a bundle.