<?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: Find and Replace Won't Replace...... in Data Management Questions</title>
    <link>https://community.esri.com/t5/data-management-questions/find-and-replace-won-t-replace/m-p/693952#M39403</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You can use this Field Calculator expression to replace Null values in any field without preselecting records.&amp;nbsp; Of course it is limited to working on one field at a time.&amp;nbsp; This approach is not recommended for SDE version editing, but it is fine for file geodatabases and shapefiles.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Parser: VBScript&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Prelogic codeblock:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;If IsNull(&lt;Z&gt;) Then ' Substitute &lt;Z&gt; with your real field name here
&amp;nbsp; Output = 0 ' Specify the replacement value for Null here. Make sure it is valid for the field you are calculating.
Else
&amp;nbsp; Output = &lt;Z&gt; ' Substitute &lt;Z&gt; with your real field name here
End If&lt;/Z&gt;&lt;/Z&gt;&lt;/Z&gt;&lt;/Z&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Expression: Output&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 05:12:32 GMT</pubDate>
    <dc:creator>RichardFairhurst</dc:creator>
    <dc:date>2021-12-12T05:12:32Z</dc:date>
    <item>
      <title>Find and Replace Won't Replace......</title>
      <link>https://community.esri.com/t5/data-management-questions/find-and-replace-won-t-replace/m-p/693948#M39399</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am trying to replace a &amp;lt;Null&amp;gt; value in a selected field. When I do a find and replace I get an error that no fields have been detected. I have put in to find &amp;lt;Null&amp;gt; and replace it with the info that I want. I have selected the field but I still get this error. Can anyone help me with this? Is there a better or another way to do this? It just takes too long to select each field and type in the replacement info.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 May 2013 11:48:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/find-and-replace-won-t-replace/m-p/693948#M39399</guid>
      <dc:creator>JamesReed1</dc:creator>
      <dc:date>2013-05-23T11:48:01Z</dc:date>
    </item>
    <item>
      <title>Re: Find and Replace Won't Replace......</title>
      <link>https://community.esri.com/t5/data-management-questions/find-and-replace-won-t-replace/m-p/693949#M39400</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I am trying to replace a &amp;lt;Null&amp;gt; value in a selected field. When I do a find and replace I get an error that no fields have been detected. I have put in to find &amp;lt;Null&amp;gt; and replace it with the info that I want. I have selected the field but I still get this error. Can anyone help me with this? Is there a better or another way to do this? It just takes too long to select each field and type in the replacement info.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;one Quick answer is for you is that convert feature class into shape file,Shapefile's do not support Null entries and automatically convert Null to zero.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You didn't mention that where you want to change the &amp;lt;Null&amp;gt; Values and what you want to replace with. Ok this time i assume that you want to replace &amp;lt;Null&amp;gt; values with some "x" value then try this script simple and straightforward. you just replace 0 to your value and make sure that you put a right path for "in_data"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy
import os

# replace data path with your OWN data.
in_data = r"C:\Data\Sample.mdb\NullValues"

field_list = []
numeric_fields = ["Double", "Integer", "SmallInteger"]

fields = arcpy.ListFields(in_data)
for field in fields:
&amp;nbsp;&amp;nbsp;&amp;nbsp; if (field.type in numeric_fields):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; field_list.append(field.name)

# convert the list of fields to a semicolor delimited string
fields = ";".join(field_list)&amp;nbsp; 

rows = arcpy.UpdateCursor(in_data, '', '', fields)
count = len(field_list)

for row in rows:
&amp;nbsp;&amp;nbsp;&amp;nbsp; for k in range(count):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if row.isNull(field_list&lt;K&gt;):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.setValue(field_list&lt;K&gt;, 0)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rows.updateRow(row)&lt;/K&gt;&lt;/K&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Let me know if you face any issues...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Gud Luck...!!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 05:12:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/find-and-replace-won-t-replace/m-p/693949#M39400</guid>
      <dc:creator>ganeshnarim</dc:creator>
      <dc:date>2021-12-12T05:12:29Z</dc:date>
    </item>
    <item>
      <title>Re: Find and Replace Won't Replace......</title>
      <link>https://community.esri.com/t5/data-management-questions/find-and-replace-won-t-replace/m-p/693950#M39401</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Find and Replace cannot find nothing.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You need to do a query using Select by Attributes.&amp;nbsp; The use Field Calculator or the Attributes window to insert a value.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;NOW I do not recommend this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can also open your database in MS Access.&amp;nbsp; Open the table that contains the &amp;lt;Null&amp;gt; values you want to replace.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Press Control H to bring up the Find Replace.&amp;nbsp; Insert the word &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Null&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;and have it match Whole Field.&amp;nbsp;&amp;nbsp; This way you can replace many thousands of null values with something.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now I must as why you want to get rid of the null values?&amp;nbsp; Is it only because you do not want to see the null value but would rather have a blank space.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Keep in mind when you replace a &amp;lt;null&amp;gt; with a value you are increasing the size of your database and it could effect performance if you do enough of them.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I am trying to replace a &amp;lt;Null&amp;gt; value in a selected field. When I do a find and replace I get an error that no fields have been detected. I have put in to find &amp;lt;Null&amp;gt; and replace it with the info that I want. I have selected the field but I still get this error. Can anyone help me with this? Is there a better or another way to do this? It just takes too long to select each field and type in the replacement info.&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 May 2013 13:19:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/find-and-replace-won-t-replace/m-p/693950#M39401</guid>
      <dc:creator>RobertBorchert</dc:creator>
      <dc:date>2013-05-23T13:19:22Z</dc:date>
    </item>
    <item>
      <title>Re: Find and Replace Won't Replace......</title>
      <link>https://community.esri.com/t5/data-management-questions/find-and-replace-won-t-replace/m-p/693951#M39402</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Or use the caveman simple approach and select &amp;lt;your_field&amp;gt; is null.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then use the field calculator on the selected set such that &amp;lt;your_field&amp;gt; = Your_Specified_Value.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 May 2013 14:01:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/find-and-replace-won-t-replace/m-p/693951#M39402</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2013-05-23T14:01:46Z</dc:date>
    </item>
    <item>
      <title>Re: Find and Replace Won't Replace......</title>
      <link>https://community.esri.com/t5/data-management-questions/find-and-replace-won-t-replace/m-p/693952#M39403</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You can use this Field Calculator expression to replace Null values in any field without preselecting records.&amp;nbsp; Of course it is limited to working on one field at a time.&amp;nbsp; This approach is not recommended for SDE version editing, but it is fine for file geodatabases and shapefiles.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Parser: VBScript&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Prelogic codeblock:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;If IsNull(&lt;Z&gt;) Then ' Substitute &lt;Z&gt; with your real field name here
&amp;nbsp; Output = 0 ' Specify the replacement value for Null here. Make sure it is valid for the field you are calculating.
Else
&amp;nbsp; Output = &lt;Z&gt; ' Substitute &lt;Z&gt; with your real field name here
End If&lt;/Z&gt;&lt;/Z&gt;&lt;/Z&gt;&lt;/Z&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Expression: Output&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 05:12:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/find-and-replace-won-t-replace/m-p/693952#M39403</guid>
      <dc:creator>RichardFairhurst</dc:creator>
      <dc:date>2021-12-12T05:12:32Z</dc:date>
    </item>
  </channel>
</rss>

