Nulls are a little tricky. You could give something like this a try.
if not ID or not OPER_MAINT_LEVEL:
return SYMBOL
Here is how I got it to work using str(!OPER_MAINT_LEVEL!):def myfunc(SYMBOL,ID,OPER_MAINT_LEVEL):
if not ID or not OPER_MAINT_LEVEL:
return SYMBOL
if ((ID == "4648" and OPER_MAINT_LEVEL == "1 - BASIC CUSTODIAL CARE (CLOSED)") or
(ID == "4654") or
(ID == "4663C" and OPER_MAINT_LEVEL == "1 - BASIC CUSTODIAL CARE (CLOSED)")):
return 4
else:
return SYMBOL
Expression:
SYMBOL =
myfunc(!SYMBOL!, !ID!, str(!OPER_MAINT_LEVEL!) )
Thanks for your help on this.