<?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 Reclassify a field in model builder in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/reclassify-a-field-in-model-builder/m-p/61611#M2167</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a fairly large model with a field in the table labeled RETURN_PER for types of flooding (2yr, 5yr, 10yr, 25yr, 50yr, 100yr, 200yr, 500yr etc.)&amp;nbsp; However the field needs to show these values as percents (50pct, 20pct, 10pct, 04pct etc.)&amp;nbsp; I need to make the change at the end of the model but am having a hard time getting the field to change values.&amp;nbsp; So far my thought process has gone Add Field -&amp;gt; Calculate Field (New field equals original field) -&amp;gt; Calculate Field (Recalculate Original field adding Reclassify script [see below] to show percentages)&amp;nbsp; -&amp;gt; Delete New Field.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;def Reclass(variable1):&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; if variable1 == "2":&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return "50pct"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; if variable1 == "5":&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return "20pct"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; if variable1 == "10":&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return "10pct"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; if variable1 == "25":&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return "04pct"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; if variable1 == "50":&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return "02pct"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; if variable1 == "100":&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return "01pct"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; if variable1 == "200":&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return "0_5pct"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; if variable1 == "500":&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return "0_2pct"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any other suggestions would be greatly appreciated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 25 Nov 2013 17:21:12 GMT</pubDate>
    <dc:creator>MeredithGreen</dc:creator>
    <dc:date>2013-11-25T17:21:12Z</dc:date>
    <item>
      <title>Reclassify a field in model builder</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/reclassify-a-field-in-model-builder/m-p/61611#M2167</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a fairly large model with a field in the table labeled RETURN_PER for types of flooding (2yr, 5yr, 10yr, 25yr, 50yr, 100yr, 200yr, 500yr etc.)&amp;nbsp; However the field needs to show these values as percents (50pct, 20pct, 10pct, 04pct etc.)&amp;nbsp; I need to make the change at the end of the model but am having a hard time getting the field to change values.&amp;nbsp; So far my thought process has gone Add Field -&amp;gt; Calculate Field (New field equals original field) -&amp;gt; Calculate Field (Recalculate Original field adding Reclassify script [see below] to show percentages)&amp;nbsp; -&amp;gt; Delete New Field.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;def Reclass(variable1):&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; if variable1 == "2":&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return "50pct"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; if variable1 == "5":&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return "20pct"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; if variable1 == "10":&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return "10pct"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; if variable1 == "25":&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return "04pct"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; if variable1 == "50":&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return "02pct"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; if variable1 == "100":&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return "01pct"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; if variable1 == "200":&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return "0_5pct"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; if variable1 == "500":&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return "0_2pct"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any other suggestions would be greatly appreciated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Nov 2013 17:21:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/reclassify-a-field-in-model-builder/m-p/61611#M2167</guid>
      <dc:creator>MeredithGreen</dc:creator>
      <dc:date>2013-11-25T17:21:12Z</dc:date>
    </item>
    <item>
      <title>Re: Reclassify a field in model builder</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/reclassify-a-field-in-model-builder/m-p/61612#M2168</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Meredith,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Are you receiving any errors?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When you create the new field, are you creating it as a "TEXT" field?&amp;nbsp; If it is a Long Integer, Short Integer, or Double try the following w/o the quotes around the value:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;def Reclass(variable1):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;if variable1 == 2:&lt;/STRONG&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return "50pct"
&amp;nbsp; ....&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 22:20:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/reclassify-a-field-in-model-builder/m-p/61612#M2168</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2021-12-10T22:20:15Z</dc:date>
    </item>
    <item>
      <title>Re: Reclassify a field in model builder</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/reclassify-a-field-in-model-builder/m-p/61613#M2169</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hi Meredith,&lt;BR /&gt;&lt;BR /&gt;Are you receiving any errors?&lt;BR /&gt;&lt;BR /&gt;When you create the new field, are you creating it as a "TEXT" field?&amp;nbsp; If it is a Long Integer, Short Integer, or Double try the following w/o the quotes around the value:&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;def Reclass(variable1):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;if variable1 == 2:&lt;/STRONG&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return "50pct"
&amp;nbsp; ....&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The new field is a text field with a length of 6.&amp;nbsp; The final field that I'm trying to reclassify has to be a text field with a length of six.&amp;nbsp; When I process I don't see any error messages but I also don't see any change in the table.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 22:20:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/reclassify-a-field-in-model-builder/m-p/61613#M2169</guid>
      <dc:creator>MeredithGreen</dc:creator>
      <dc:date>2021-12-10T22:20:17Z</dc:date>
    </item>
    <item>
      <title>Re: Reclassify a field in model builder</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/reclassify-a-field-in-model-builder/m-p/61614#M2170</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;The new field is a text field with a length of 6.&amp;nbsp; The final field that I'm trying to reclassify has to be a text field with a length of six.&amp;nbsp; When I process I don't see any error messages but I also don't see any change in the table.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You did not provide your expression.&amp;nbsp; It needs to contain the field name of the field with the original values you are evaluating and the calculation needs to be done on the field that will have the reclassified values.&amp;nbsp; Something like:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;def Reclass(!RETURN_PER!)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Nov 2013 18:24:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/reclassify-a-field-in-model-builder/m-p/61614#M2170</guid>
      <dc:creator>RichardFairhurst</dc:creator>
      <dc:date>2013-11-25T18:24:47Z</dc:date>
    </item>
    <item>
      <title>Re: Reclassify a field in model builder</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/reclassify-a-field-in-model-builder/m-p/61615#M2171</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;You did not provide your expression.&amp;nbsp; It needs to contain the field name of the field with the original values you are evaluating and the calculation needs to be done on the field that will have the reclassified values.&amp;nbsp; Something like:&lt;BR /&gt;&lt;BR /&gt;def Reclass(!RETURN_PER!)&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Okay so I got it working once I added def Reclass but now the table is automatically filling in the field with the domain code description that corresponds with the percentages.&amp;nbsp; Is there a way to correct this so it puts in the percentages instead?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Nov 2013 18:58:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/reclassify-a-field-in-model-builder/m-p/61615#M2171</guid>
      <dc:creator>MeredithGreen</dc:creator>
      <dc:date>2013-11-25T18:58:19Z</dc:date>
    </item>
    <item>
      <title>Re: Reclassify a field in model builder</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/reclassify-a-field-in-model-builder/m-p/61616#M2172</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Okay so I got it working once I added def Reclass but now the table is automatically filling in the field with the domain code description that corresponds with the percentages.&amp;nbsp; Is there a way to correct this so it puts in the percentages instead?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Give an example of what would you want it to appear like.&amp;nbsp; Are you saying you want it to appear as 50pct, but it appears as something else?&amp;nbsp; Removing the domain from the field is the easiest way to get it to show the native value you calculated.&amp;nbsp; Otherwise you would have to alter the domain descriptions to appear the way you want (even if the value and the description are identical to each other).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Nov 2013 19:06:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/reclassify-a-field-in-model-builder/m-p/61616#M2172</guid>
      <dc:creator>RichardFairhurst</dc:creator>
      <dc:date>2013-11-25T19:06:17Z</dc:date>
    </item>
    <item>
      <title>Re: Reclassify a field in model builder</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/reclassify-a-field-in-model-builder/m-p/61617#M2173</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Give an example of what would you want it to appear like.&amp;nbsp; Are you saying you want it to appear as 50pct, but it appears as something else?&amp;nbsp; Removing the domain from the field is the easiest way to get it to show the native value you calculated.&amp;nbsp; Otherwise you would have to alter the domain descriptions to appear the way you want (even if the value and the description are identical to each other).&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Removing the domain from the field solved it.&amp;nbsp; Thanks for the input!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Nov 2013 12:05:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/reclassify-a-field-in-model-builder/m-p/61617#M2173</guid>
      <dc:creator>MeredithGreen</dc:creator>
      <dc:date>2013-11-26T12:05:47Z</dc:date>
    </item>
  </channel>
</rss>

