<?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 Re: Basic check for Null not working in ArcGIS Pro Field Calculator in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/basic-check-for-null-not-working-in-arcgis-pro/m-p/1412418#M82118</link>
    <description>&lt;P&gt;Thanks so much Dan!&amp;nbsp; The problem was not the null at all.&amp;nbsp; It was the syntax error I made where I left out the parenthesis but it did not generate an error.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 19 Apr 2024 17:29:32 GMT</pubDate>
    <dc:creator>NeoGeo</dc:creator>
    <dc:date>2024-04-19T17:29:32Z</dc:date>
    <item>
      <title>Basic check for Null not working in ArcGIS Pro Field Calculator</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/basic-check-for-null-not-working-in-arcgis-pro/m-p/1412381#M82114</link>
      <description>&lt;P&gt;A super basic check for NULL in ArcGIS Pro Field calculator on a feature layer in ArcGISOnline&amp;nbsp; does not work on&amp;nbsp;a text field containing an address.&amp;nbsp; It bombs and deletes all the data in the field or produces an error depending on which way I try to do it.&amp;nbsp; It does not appear to equate None with NULL either.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;P&gt;MrClean(!ADDRESS!)&lt;/P&gt;&lt;P&gt;def MrClean(MyInput):&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;if MyInput is None:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pass&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;else:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return MyInput.strip&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is what I have tried:&lt;/P&gt;&lt;P&gt;if MyInput is None&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; No error just wipes out everything in the field because it is not finding the NULL values&lt;BR /&gt;if MyInput == None&amp;nbsp; &amp;nbsp; &amp;nbsp;No error just wipes out everything in the field because it is not finding the NULL values&lt;BR /&gt;if isnull(MyInput)&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;NameError: name 'isnull' is not defined&lt;BR /&gt;if MyInput.isnull()&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AttributeError: 'str' object has no attribute 'isnull'&lt;BR /&gt;if isNull(MyInput)&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; NameError: name 'isNull' is not defined&lt;BR /&gt;if MyInput is NULL&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; NameError: name 'NULL' is not defined&lt;BR /&gt;if MyInput is Null&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;NameError: name 'NULL' is not defined&lt;BR /&gt;if MyInput is null&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; NameError: name 'NULL' is not defined&lt;BR /&gt;if MyInput == ' '&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;It wipes out everything and only gives this: WARNING 002858: Certain rows set to NULL due to error while evaluating python expression: File "&amp;lt;string&amp;gt;", line 9, in MrClean&lt;BR /&gt;if MyInput == null:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; NameError: name 'null' is not defined&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Apr 2024 16:50:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/basic-check-for-null-not-working-in-arcgis-pro/m-p/1412381#M82114</guid>
      <dc:creator>NeoGeo</dc:creator>
      <dc:date>2024-04-19T16:50:36Z</dc:date>
    </item>
    <item>
      <title>Re: Basic check for Null not working in ArcGIS Pro Field Calculator</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/basic-check-for-null-not-working-in-arcgis-pro/m-p/1412389#M82116</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;MyInput = "  ooops  "
def MrClean(MyInput):
     if MyInput is not None:
          return MyInput.strip()
print(MrClean(None))
None

print(MrClean(MyInput))
ooops&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Apr 2024 17:03:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/basic-check-for-null-not-working-in-arcgis-pro/m-p/1412389#M82116</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2024-04-19T17:03:07Z</dc:date>
    </item>
    <item>
      <title>Re: Basic check for Null not working in ArcGIS Pro Field Calculator</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/basic-check-for-null-not-working-in-arcgis-pro/m-p/1412418#M82118</link>
      <description>&lt;P&gt;Thanks so much Dan!&amp;nbsp; The problem was not the null at all.&amp;nbsp; It was the syntax error I made where I left out the parenthesis but it did not generate an error.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Apr 2024 17:29:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/basic-check-for-null-not-working-in-arcgis-pro/m-p/1412418#M82118</guid>
      <dc:creator>NeoGeo</dc:creator>
      <dc:date>2024-04-19T17:29:32Z</dc:date>
    </item>
  </channel>
</rss>

