John_T

Another <null> question

Discussion created by John_T on Jul 23, 2012
Latest reply on Jul 26, 2012 by alanrussian
Hi,

I'm trying to calculate a new field which will retain the values of 'Path_F' and change null values to 1. The following statement works fine were Path_F has a value but doesn't change the null values.

def main(Path_F):
if Path_F > 0:
  return Path_F
elif Path_F == " ":
  return 1

I've also tried,
                    else:
                          return 1
and, 
                    elif Path_F is None:
                          return 1

These don't work work either.

Does anybody have any other possible solutions?

Thanks

John

Outcomes