<?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: Replace empty cells with text in a text string in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/replace-empty-cells-with-text-in-a-text-string/m-p/724649#M56110</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok interestingly my original code works with a few minor tweaks- swapping " " for ' '&lt;/P&gt;&lt;P&gt;hmmmm...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/410542_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 04 Jun 2018 13:05:59 GMT</pubDate>
    <dc:creator>TheodoreF</dc:creator>
    <dc:date>2018-06-04T13:05:59Z</dc:date>
    <item>
      <title>Replace empty cells with text in a text string</title>
      <link>https://community.esri.com/t5/python-questions/replace-empty-cells-with-text-in-a-text-string/m-p/724645#M56106</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I can't find the answer anywhere, but how can I replace cells in a string field that have no data at all in them, with text? I'm not looking to replace spaces.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="410304" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/410304_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The second row here in Claim_Spend_in_£ (which is a text tield), has no data at all in it. It is not a blank space, or a NULL. I want all blank entries to be replaced with the text "Unrecorded". But the code I used above does nothing... I've tried using "", " ", None and neither of those work. I've also tried .strip to strip the field of any spaces first before running replace. No difference.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I acheive this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And for&lt;STRONG&gt; further&lt;/STRONG&gt; help, how can I replace all &amp;lt;Null&amp;gt; entries in a DATE formatted field, with the date "11/11/1111"? (Essentially I can't have any null values, so any unrecorded dates have to be a made up filler of 11/11/1111...&lt;/P&gt;&lt;P&gt;I see there is no .replace function for non-string fields...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 May 2018 11:25:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/replace-empty-cells-with-text-in-a-text-string/m-p/724645#M56106</guid>
      <dc:creator>TheodoreF</dc:creator>
      <dc:date>2018-05-31T11:25:23Z</dc:date>
    </item>
    <item>
      <title>Re: Replace empty cells with text in a text string</title>
      <link>https://community.esri.com/t5/python-questions/replace-empty-cells-with-text-in-a-text-string/m-p/724646#M56107</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this... assuming it is some variant of a space or whitespace this field calculator expression should work&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-3 jive-image" height="236" src="https://community.esri.com/legacyfs/online/410321_strip_whitespace.png" width="587" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or it that fails you might try a variant&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image" height="125" src="https://community.esri.com/legacyfs/online/410313_strip_emptyish1.png" width="309" /&gt;&lt;IMG alt="" class="image-2 jive-image" height="99" src="https://community.esri.com/legacyfs/online/410314_strip_emptyish2.png" width="295" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 May 2018 13:30:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/replace-empty-cells-with-text-in-a-text-string/m-p/724646#M56107</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-05-31T13:30:19Z</dc:date>
    </item>
    <item>
      <title>Re: Replace empty cells with text in a text string</title>
      <link>https://community.esri.com/t5/python-questions/replace-empty-cells-with-text-in-a-text-string/m-p/724647#M56108</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As for the &amp;lt;null&amp;gt;, simply do a query for null to get them selected, then when you use the Field calculator, you just enter your value for the field calculation.&amp;nbsp; If it is an actual date field, I am not sure you just put in your 11/11/1111 string, but report back if you have an issue&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jun 2018 20:39:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/replace-empty-cells-with-text-in-a-text-string/m-p/724647#M56108</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-06-01T20:39:29Z</dc:date>
    </item>
    <item>
      <title>Re: Replace empty cells with text in a text string</title>
      <link>https://community.esri.com/t5/python-questions/replace-empty-cells-with-text-in-a-text-string/m-p/724648#M56109</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The first solution gave ERROR 999999:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="410540" class="image-1 jive-image" height="302" src="https://community.esri.com/legacyfs/online/410540_pastedImage_1.png" width="614" /&gt;&lt;/P&gt;&lt;P&gt;and the second solution did the same:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="410541" class="image-2 jive-image" height="434" src="https://community.esri.com/legacyfs/online/410541_pastedImage_2.png" width="617" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the help though! I'm going to try selecting all blank entries and then insert "Unrecorded" into those selected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EDIT: that won't work as I need this process to run outside of an ArcGIS Pro session. Select by attribute works off ToC layers... &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Jun 2018 12:45:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/replace-empty-cells-with-text-in-a-text-string/m-p/724648#M56109</guid>
      <dc:creator>TheodoreF</dc:creator>
      <dc:date>2018-06-04T12:45:52Z</dc:date>
    </item>
    <item>
      <title>Re: Replace empty cells with text in a text string</title>
      <link>https://community.esri.com/t5/python-questions/replace-empty-cells-with-text-in-a-text-string/m-p/724649#M56110</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok interestingly my original code works with a few minor tweaks- swapping " " for ' '&lt;/P&gt;&lt;P&gt;hmmmm...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/410542_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Jun 2018 13:05:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/replace-empty-cells-with-text-in-a-text-string/m-p/724649#M56110</guid>
      <dc:creator>TheodoreF</dc:creator>
      <dc:date>2018-06-04T13:05:59Z</dc:date>
    </item>
    <item>
      <title>Re: Replace empty cells with text in a text string</title>
      <link>https://community.esri.com/t5/python-questions/replace-empty-cells-with-text-in-a-text-string/m-p/724650#M56111</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The single quote issue is likely related to &lt;A class="link-titled" href="http://pro.arcgis.com/en/pro-app/help/mapping/navigation/sql-reference-for-elements-used-in-query-expressions.htm" title="http://pro.arcgis.com/en/pro-app/help/mapping/navigation/sql-reference-for-elements-used-in-query-expressions.htm"&gt;SQL reference for query expressions used in ArcGIS—ArcGIS Pro | ArcGIS Desktop&lt;/A&gt; :&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;H2 style="font-weight: 300; font-style: normal; margin: -165px 0px 1.55rem; font-size: 1.9994rem; line-height: 2.325rem; padding-top: 175px; color: #4c4c4c; font-family: 'Avenir Next W01', 'Avenir Next W00', 'Avenir Next', Avenir, 'Helvetica Neue', sans-serif; font-variant-ligatures: normal; font-variant-caps: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"&gt;Common queries: Searching strings&lt;/H2&gt;&lt;P style="margin-top: 0px; margin-bottom: 1.55rem; color: #4c4c4c; font-family: 'Avenir Next W01', 'Avenir Next W00', 'Avenir Next', Avenir, 'Helvetica Neue', sans-serif; font-size: 17px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"&gt;Strings must always be enclosed in single quotation marks in queries, for example:&lt;/P&gt;&lt;PRE style="font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, monospace; white-space: pre-wrap; word-wrap: break-word; max-width: 100%; margin-bottom: 1.55rem; color: #4c4c4c; font-size: 17px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"&gt;STATE_NAME = 'California'&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Jun 2018 13:20:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/replace-empty-cells-with-text-in-a-text-string/m-p/724650#M56111</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2018-06-04T13:20:55Z</dc:date>
    </item>
    <item>
      <title>Re: Replace empty cells with text in a text string</title>
      <link>https://community.esri.com/t5/python-questions/replace-empty-cells-with-text-in-a-text-string/m-p/724651#M56112</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You indented the return line.&lt;/P&gt;&lt;P&gt;Don't&lt;/P&gt;&lt;P&gt;see my example&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Jun 2018 20:29:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/replace-empty-cells-with-text-in-a-text-string/m-p/724651#M56112</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-06-04T20:29:20Z</dc:date>
    </item>
    <item>
      <title>Re: Replace empty cells with text in a text string</title>
      <link>https://community.esri.com/t5/python-questions/replace-empty-cells-with-text-in-a-text-string/m-p/724652#M56113</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;'return' should use a single indent, you have double indented, hence it will fail&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Jun 2018 20:37:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/replace-empty-cells-with-text-in-a-text-string/m-p/724652#M56113</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-06-04T20:37:26Z</dc:date>
    </item>
    <item>
      <title>Re: Replace empty cells with text in a text string</title>
      <link>https://community.esri.com/t5/python-questions/replace-empty-cells-with-text-in-a-text-string/m-p/724653#M56114</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Dan, both your solutions worked perfectly with the single indent. Interestingly when typing out your script it defautled to double indent when I hit Enter after the line ending "Unrecorded". I assumed Pro would handle indents for me.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jun 2018 12:25:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/replace-empty-cells-with-text-in-a-text-string/m-p/724653#M56114</guid>
      <dc:creator>TheodoreF</dc:creator>
      <dc:date>2018-06-05T12:25:11Z</dc:date>
    </item>
    <item>
      <title>Re: Replace empty cells with text in a text string</title>
      <link>https://community.esri.com/t5/python-questions/replace-empty-cells-with-text-in-a-text-string/m-p/724654#M56115</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To answer the second part of my question relating to replacing all NULL values in a date field, with the made up date of '11/11/1111', this solution works well:&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/410609_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jun 2018 14:15:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/replace-empty-cells-with-text-in-a-text-string/m-p/724654#M56115</guid>
      <dc:creator>TheodoreF</dc:creator>
      <dc:date>2018-06-05T14:15:36Z</dc:date>
    </item>
    <item>
      <title>Re: Replace empty cells with text in a text string</title>
      <link>https://community.esri.com/t5/python-questions/replace-empty-cells-with-text-in-a-text-string/m-p/1626146#M74422</link>
      <description>&lt;P&gt;This is what I needed to remember. Thank you!&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jun 2025 12:54:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/replace-empty-cells-with-text-in-a-text-string/m-p/1626146#M74422</guid>
      <dc:creator>JDM_82</dc:creator>
      <dc:date>2025-06-24T12:54:33Z</dc:date>
    </item>
  </channel>
</rss>

