<?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: Error while reclassifying slope value using calculate field in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/error-while-reclassifying-slope-value-using/m-p/1168630#M54505</link>
    <description>&lt;P&gt;Hi Dan, thanks for your input,&lt;BR /&gt;&lt;BR /&gt;Silly error there, but this doesn't seem to be the problem I am facing. Even after removing the space, the same error message shows up.&lt;BR /&gt;&lt;BR /&gt;Regards, Kedar&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 28 Apr 2022 05:43:51 GMT</pubDate>
    <dc:creator>KedaravindanBhaskar</dc:creator>
    <dc:date>2022-04-28T05:43:51Z</dc:date>
    <item>
      <title>Error while reclassifying slope value using calculate field</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/error-while-reclassifying-slope-value-using/m-p/1168306#M54466</link>
      <description>&lt;P&gt;Hello, I am having trouble reclassifying slope value into a new field.&lt;BR /&gt;&lt;BR /&gt;I have attached an image with the dialogue box for the calculate field tool, including the code I am using.&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Calculate field error while reclassifying slope.PNG" style="width: 476px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/39941i50C60DEC4EE86FAC/image-size/large?v=v2&amp;amp;px=999" role="button" title="Calculate field error while reclassifying slope.PNG" alt="Calculate field error while reclassifying slope.PNG" /&gt;&lt;/span&gt;&lt;BR /&gt;Something(s) to consider - I am using the tool in the workflow for a model and have used an iterator before the tool. Hence the "&lt;STRONG&gt;%Value%&lt;/STRONG&gt;_Slope_Type"(Inline variable substitution). I also tried executing the tool outside the model but I get the same result.&lt;BR /&gt;&lt;BR /&gt;The error message I receive is as follows -&amp;nbsp; ERROR 000013: N_Slope_Type already in N_Sample_Lines&lt;BR /&gt;Failed to execute (Calculate Field).&lt;BR /&gt;&lt;BR /&gt;I am using ArcGIS Pro version 2.9.0.&lt;BR /&gt;&lt;BR /&gt;Any help would be greatly appreciated.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Regards, Kedar&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Apr 2022 13:06:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/error-while-reclassifying-slope-value-using/m-p/1168306#M54466</guid>
      <dc:creator>KedaravindanBhaskar</dc:creator>
      <dc:date>2022-04-27T13:06:07Z</dc:date>
    </item>
    <item>
      <title>Re: Error while reclassifying slope value using calculate field</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/error-while-reclassifying-slope-value-using/m-p/1168360#M54473</link>
      <description>&lt;P&gt;Not sure with inline substitution but normally the expression box you call the def in the Code Block and pass the field variable.&lt;/P&gt;&lt;P&gt;Instead of %Value%_Slope, try this:&amp;nbsp; &amp;nbsp; reclass(!%Value%_Slope!)&lt;/P&gt;&lt;P&gt;R_&lt;/P&gt;</description>
      <pubDate>Wed, 27 Apr 2022 15:00:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/error-while-reclassifying-slope-value-using/m-p/1168360#M54473</guid>
      <dc:creator>RhettZufelt</dc:creator>
      <dc:date>2022-04-27T15:00:00Z</dc:date>
    </item>
    <item>
      <title>Re: Error while reclassifying slope value using calculate field</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/error-while-reclassifying-slope-value-using/m-p/1168407#M54477</link>
      <description>&lt;P&gt;Also, you have a space in the new or existing field name, remove it or replace it with an _ .&lt;/P&gt;</description>
      <pubDate>Wed, 27 Apr 2022 15:54:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/error-while-reclassifying-slope-value-using/m-p/1168407#M54477</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2022-04-27T15:54:10Z</dc:date>
    </item>
    <item>
      <title>Re: Error while reclassifying slope value using calculate field</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/error-while-reclassifying-slope-value-using/m-p/1168629#M54504</link>
      <description>&lt;P&gt;Hi Rhett, thanks for your response,&lt;BR /&gt;&lt;BR /&gt;I changed "&lt;SPAN&gt;%Value%_Slope" to "reclass(!%Value%_Slope!)" but the calculate field tool greyed out. I also changed the expression type to Arcade and ran the new code. That didn't work either.&lt;BR /&gt;&lt;BR /&gt;Any thoughts?&lt;BR /&gt;&lt;BR /&gt;Regards, Kedar&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Apr 2022 05:41:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/error-while-reclassifying-slope-value-using/m-p/1168629#M54504</guid>
      <dc:creator>KedaravindanBhaskar</dc:creator>
      <dc:date>2022-04-28T05:41:31Z</dc:date>
    </item>
    <item>
      <title>Re: Error while reclassifying slope value using calculate field</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/error-while-reclassifying-slope-value-using/m-p/1168630#M54505</link>
      <description>&lt;P&gt;Hi Dan, thanks for your input,&lt;BR /&gt;&lt;BR /&gt;Silly error there, but this doesn't seem to be the problem I am facing. Even after removing the space, the same error message shows up.&lt;BR /&gt;&lt;BR /&gt;Regards, Kedar&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Apr 2022 05:43:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/error-while-reclassifying-slope-value-using/m-p/1168630#M54505</guid>
      <dc:creator>KedaravindanBhaskar</dc:creator>
      <dc:date>2022-04-28T05:43:51Z</dc:date>
    </item>
    <item>
      <title>Re: Error while reclassifying slope value using calculate field</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/error-while-reclassifying-slope-value-using/m-p/1168668#M54507</link>
      <description>&lt;P&gt;see the calculate field example here&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/help/analysis/geoprocessing/modelbuilder/inline-variable-substitution.htm" target="_blank"&gt;Inline variable substitution—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;it seems the field and value are separated&lt;/P&gt;&lt;P&gt;I don't use modelbuilder so you may have to experiment with the correct syntax&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/1325"&gt;@curtvprice&lt;/a&gt;&amp;nbsp;do you have any ideas?&lt;/P&gt;</description>
      <pubDate>Thu, 28 Apr 2022 08:52:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/error-while-reclassifying-slope-value-using/m-p/1168668#M54507</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2022-04-28T08:52:31Z</dc:date>
    </item>
    <item>
      <title>Re: Error while reclassifying slope value using calculate field</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/error-while-reclassifying-slope-value-using/m-p/1168680#M54509</link>
      <description>&lt;P&gt;Thank you once again, Dan,&lt;BR /&gt;&lt;BR /&gt;Will test it and let you know the outcome&lt;BR /&gt;&lt;BR /&gt;Warm regards, Kedar&lt;/P&gt;</description>
      <pubDate>Thu, 28 Apr 2022 11:17:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/error-while-reclassifying-slope-value-using/m-p/1168680#M54509</guid>
      <dc:creator>KedaravindanBhaskar</dc:creator>
      <dc:date>2022-04-28T11:17:52Z</dc:date>
    </item>
    <item>
      <title>Re: Error while reclassifying slope value using calculate field</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/error-while-reclassifying-slope-value-using/m-p/1168720#M54514</link>
      <description>&lt;P&gt;Hi Dan.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's my fix&lt;/P&gt;&lt;P class=""&gt;Field Name: &lt;STRONG&gt;%Value%_Slope_Type&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P class=""&gt;Expression: &lt;STRONG&gt;reclass(!%Value%_Slope!)&lt;/STRONG&gt;&amp;nbsp;(I am assuming this is a field name (of a &lt;EM&gt;numeric field&lt;/EM&gt; in your table, since you are doing a numeric comparison in your code block)&lt;/P&gt;&lt;P class=""&gt;Code Block: (unlike label expressions you must use a local variable here. Make sure you handle the 0 or None [null]&amp;nbsp; case)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;def reclass(vs):
    if vs &amp;lt; 0: 
        return 1
    elif vs &amp;gt; 0:
        return 2
    else:
        return 0&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The error message (&lt;SPAN&gt;ERROR 000013: N_Slope_Type already in N_Sample_Lines)&amp;nbsp;&lt;/SPAN&gt;may reflect that first time &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/81133"&gt;@KedaravindanBhaskar&lt;/a&gt;&amp;nbsp;&amp;nbsp;ran the model the field N_Slope_Type didn't exist yet, so the field existed already from then on but ModelBuilder didn't know it so tried to add it hence the error.&amp;nbsp; The Calculate Field tool has the capability of creating a field as it runs, but because of ModelBuilder validation issues I do not use this feature as it may work the first time but not in future iterations because of validation confusion (the validation tells GP the field does not exist but in iteration two or another run, it exists!) (I think this was a bad design decision, but I'm sure they had their reasons.)&amp;nbsp; When I am creating a new field I run the Add Field tool&amp;nbsp;&lt;U&gt;first&lt;/U&gt; (in your case adding the field %Value%_Slope_Type) because if the field exists, Add Field just passes a warning and moves on.&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Apr 2022 13:29:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/error-while-reclassifying-slope-value-using/m-p/1168720#M54514</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2022-04-28T13:29:39Z</dc:date>
    </item>
    <item>
      <title>Re: Error while reclassifying slope value using calculate field</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/error-while-reclassifying-slope-value-using/m-p/1169151#M54583</link>
      <description>&lt;P&gt;Hi Curt. It worked!&lt;BR /&gt;&lt;BR /&gt;Here's what I did -&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;- I inserted an Add field before the calculate field as you said.&lt;BR /&gt;&lt;BR /&gt;- The details of the calculate field are in the image of the dialogue window -&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Calculate field error while reclassifying slope FIXED.PNG" style="width: 474px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/40155i4B2B9E6BCCD5DA89/image-size/large?v=v2&amp;amp;px=999" role="button" title="Calculate field error while reclassifying slope FIXED.PNG" alt="Calculate field error while reclassifying slope FIXED.PNG" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Thank you so much, Curt!&lt;BR /&gt;&lt;BR /&gt;Regards, Kedar&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Apr 2022 05:06:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/error-while-reclassifying-slope-value-using/m-p/1169151#M54583</guid>
      <dc:creator>KedaravindanBhaskar</dc:creator>
      <dc:date>2022-04-29T05:06:37Z</dc:date>
    </item>
  </channel>
</rss>

