Quantcast
Channel: Forums - Python
Viewing all articles
Browse latest Browse all 2485

Test for Null values Field Calculator

$
0
0
Ok, I just finished reading a bunch of threads on this, but need to double check this issue. I want to put something like this
Code:

def i(x):
  if x is None:
    return "Used to be Null"
  else:
    return x

into the code-block, but I've tried all sorts of variations that have been suggested, x == None, x == "", if not x, but nothing has produced any change in the values.

Am I missing something, or is this just not going to work and I'll have to use update cursors to perform operations like this?

I'm using 10.0 SP5.

Thank you!

Viewing all articles
Browse latest Browse all 2485

Trending Articles