AnsweredAssumed Answered

Select Null Values from Field and Replace with Text - Field Calculator

Question asked by adoriana1 on Aug 14, 2014
Latest reply on Aug 14, 2014 by adoriana1

This should've been an easy thing, but it gives me problems. I am trying to build a model and I want to use the Field Calculator to replace all the null vaules with a text. I'll do a series of append, and after each append I want to calculate the null values to be a certain text value (which I input). Here is the code that I am using:

def RemoveNULL(Name):

   if  Name is None:

     then return 'Basin'


return Name


I am not very good at writing codes so I am not sure what is wrong here. When I run it, I get this:

Expected 'Then' Failed to execute (Calculate Field).


Any help would be appreciated. Thanks.