<?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: Reclassifying Values in a Text Field in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/reclassifying-values-in-a-text-field/m-p/39814#M3175</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Are you attempting to write the new text values to the same field or a new field?&amp;nbsp; I was able to get the code working when writing the values to a new field.&amp;nbsp; I have the 25, 75, 120 values in a field called 'Class' and then I created a new field called 'Description'. Next, I ran the following code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Pre-logic Script Code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;def Reclass(SetbackType):
 if SetbackType == 25:
&amp;nbsp; return "25 ft Setback"
 elif SetbackType == 75:
&amp;nbsp; return "75 ft Setback"
 elif SetbackType == 120:
&amp;nbsp; return "120 ft Setback"&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Description = &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Reclass(!Class!)&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Dec 2021 21:32:55 GMT</pubDate>
    <dc:creator>JakeSkinner</dc:creator>
    <dc:date>2021-12-10T21:32:55Z</dc:date>
    <item>
      <title>Reclassifying Values in a Text Field</title>
      <link>https://community.esri.com/t5/python-questions/reclassifying-values-in-a-text-field/m-p/39813#M3174</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am trying to reclassify a text field that was populated with values from a numeric field.&amp;nbsp; The numeric values represent riparian setback buffer widths, and I would like the reclassified values in the field that I am calling "SetbackType" to be more descriptive.&amp;nbsp; So instead of having a value of just "25" I would like the field value to contain the string "25 ft setback". &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; I found a block of code from the ArcGIS 10 help to reclassify a field, there are no errors in the code that prevent the script from running, but after it has run in the field calculator, the values for the "SetbackType" field have not changed.&amp;nbsp; Any thoughts on what the problem might be?&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is the code I am using.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;def Reclass(SetbackType):&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; if SetbackType == 25:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return "25 ft Setback"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; elif SetbackType == 75:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return "75 ftSetback"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; elif SetbackType == 120:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return "120 ft Setback"&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Sep 2011 15:05:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/reclassifying-values-in-a-text-field/m-p/39813#M3174</guid>
      <dc:creator>TomKoritansky</dc:creator>
      <dc:date>2011-09-28T15:05:12Z</dc:date>
    </item>
    <item>
      <title>Re: Reclassifying Values in a Text Field</title>
      <link>https://community.esri.com/t5/python-questions/reclassifying-values-in-a-text-field/m-p/39814#M3175</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Are you attempting to write the new text values to the same field or a new field?&amp;nbsp; I was able to get the code working when writing the values to a new field.&amp;nbsp; I have the 25, 75, 120 values in a field called 'Class' and then I created a new field called 'Description'. Next, I ran the following code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Pre-logic Script Code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;def Reclass(SetbackType):
 if SetbackType == 25:
&amp;nbsp; return "25 ft Setback"
 elif SetbackType == 75:
&amp;nbsp; return "75 ft Setback"
 elif SetbackType == 120:
&amp;nbsp; return "120 ft Setback"&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Description = &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Reclass(!Class!)&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 21:32:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/reclassifying-values-in-a-text-field/m-p/39814#M3175</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2021-12-10T21:32:55Z</dc:date>
    </item>
    <item>
      <title>Re: Reclassifying Values in a Text Field</title>
      <link>https://community.esri.com/t5/python-questions/reclassifying-values-in-a-text-field/m-p/39815#M3176</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for your help.&amp;nbsp; I tried using the code with your example and found my error.&amp;nbsp; Everything works as it should now!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Sep 2011 15:58:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/reclassifying-values-in-a-text-field/m-p/39815#M3176</guid>
      <dc:creator>TomKoritansky</dc:creator>
      <dc:date>2011-09-28T15:58:04Z</dc:date>
    </item>
  </channel>
</rss>

