I am trying to perform an operation on a string field with a condition that it contains data. Referencing None
with Python does not appear to work when the field is nullable and contains <Null>
for its data. Am I missing something? I have tried len()
and "<Null>"
and "Null"
as well. What do?
The code, for kicks:
def apt(addr,aptnum):
if aptnum != None:
a = addr.split(aptnum,1)[-1]
return a
else:
return addr
Update: It would appear that my problem is that field calculations are not processing on any rows where a null
column is tested. That is outside the scope of this question, however, so I will leave it for the time being.
NULL
s in field calculator and I'm pretty sure they made it into SP2. – Jason Scheirer Aug 10 '11 at 16:40