<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Select Null Values from Field and Replace with Text - Field Calculator in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/select-null-values-from-field-and-replace-with/m-p/298324#M10312</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;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:&lt;/P&gt;&lt;P&gt;def RemoveNULL(Name):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; if&amp;nbsp; Name is None:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; then return 'Basin'&lt;/P&gt;&lt;P&gt;else:&lt;/P&gt;&lt;P&gt;return Name&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not very good at writing codes so I am not sure what is wrong here. When I run it, I get this:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Expected 'Then' Failed to execute (Calculate Field).&lt;/EM&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be appreciated. Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 14 Aug 2014 16:52:14 GMT</pubDate>
    <dc:creator>AndreeaAmbrus</dc:creator>
    <dc:date>2014-08-14T16:52:14Z</dc:date>
    <item>
      <title>Select Null Values from Field and Replace with Text - Field Calculator</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/select-null-values-from-field-and-replace-with/m-p/298324#M10312</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;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:&lt;/P&gt;&lt;P&gt;def RemoveNULL(Name):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; if&amp;nbsp; Name is None:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; then return 'Basin'&lt;/P&gt;&lt;P&gt;else:&lt;/P&gt;&lt;P&gt;return Name&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not very good at writing codes so I am not sure what is wrong here. When I run it, I get this:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Expected 'Then' Failed to execute (Calculate Field).&lt;/EM&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be appreciated. Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Aug 2014 16:52:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/select-null-values-from-field-and-replace-with/m-p/298324#M10312</guid>
      <dc:creator>AndreeaAmbrus</dc:creator>
      <dc:date>2014-08-14T16:52:14Z</dc:date>
    </item>
    <item>
      <title>Re: Select Null Values from Field and Replace with Text - Field Calculator</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/select-null-values-from-field-and-replace-with/m-p/298325#M10313</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your last two lines are indented improperly, they should be&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_1408036501154570 jive_text_macro" jivemacro_uid="_1408036501154570" modifiedtitle="true"&gt;
&lt;P&gt;if&amp;nbsp; Name is None:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; return 'Basin'&lt;/P&gt;
&lt;P&gt;else:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; return Name&lt;/P&gt;

&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Aug 2014 17:16:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/select-null-values-from-field-and-replace-with/m-p/298325#M10313</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2014-08-14T17:16:03Z</dc:date>
    </item>
    <item>
      <title>Re: Select Null Values from Field and Replace with Text - Field Calculator</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/select-null-values-from-field-and-replace-with/m-p/298326#M10314</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;IMG alt="Picture1.png" class="jive-image image-1" src="https://community.esri.com/legacyfs/online/3462_Picture1.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you, I tried it, but I still get the same message " Expected 'Then' Failed to execute (Calculate Field)."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Aug 2014 17:19:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/select-null-values-from-field-and-replace-with/m-p/298326#M10314</guid>
      <dc:creator>AndreeaAmbrus</dc:creator>
      <dc:date>2014-08-14T17:19:59Z</dc:date>
    </item>
    <item>
      <title>Re: Select Null Values from Field and Replace with Text - Field Calculator</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/select-null-values-from-field-and-replace-with/m-p/298327#M10315</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Also change your parser from VB to Python (at the top of the field calculator window)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Aug 2014 17:20:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/select-null-values-from-field-and-replace-with/m-p/298327#M10315</guid>
      <dc:creator>JorgeOrellana</dc:creator>
      <dc:date>2014-08-14T17:20:14Z</dc:date>
    </item>
    <item>
      <title>Re: Select Null Values from Field and Replace with Text - Field Calculator</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/select-null-values-from-field-and-replace-with/m-p/298328#M10316</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;your first return statement has 2 spaces, your last one has only 1...spacing must be consistent&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Aug 2014 17:25:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/select-null-values-from-field-and-replace-with/m-p/298328#M10316</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2014-08-14T17:25:23Z</dc:date>
    </item>
    <item>
      <title>Re: Select Null Values from Field and Replace with Text - Field Calculator</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/select-null-values-from-field-and-replace-with/m-p/298329#M10317</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;we will get this right after all..if you are using the Python parser, and ...if your field is called Name, then the field name in the lower section must be enclosed in exclamation marks&lt;/P&gt;&lt;P&gt;!Name!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Aug 2014 17:43:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/select-null-values-from-field-and-replace-with/m-p/298329#M10317</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2014-08-14T17:43:11Z</dc:date>
    </item>
    <item>
      <title>Re: Select Null Values from Field and Replace with Text - Field Calculator</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/select-null-values-from-field-and-replace-with/m-p/298330#M10318</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It worked! Thank you!!!!!!! I guess it's time for me to start learning Python:)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Aug 2014 18:16:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/select-null-values-from-field-and-replace-with/m-p/298330#M10318</guid>
      <dc:creator>AndreeaAmbrus</dc:creator>
      <dc:date>2014-08-14T18:16:38Z</dc:date>
    </item>
  </channel>
</rss>

