<?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: ArcGIS Pro 2.8.4: The Python If statement fails to work, in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/arcgis-pro-2-8-4-the-python-if-statement-fails-to/m-p/1186872#M56619</link>
    <description>&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;Confinement == "Confined"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;and it should be, with a python parser&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Reclass(!Confinement!)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;to invoke it.&amp;nbsp; Note the enclosing ! marks&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 27 Jun 2022 17:14:24 GMT</pubDate>
    <dc:creator>DanPatterson</dc:creator>
    <dc:date>2022-06-27T17:14:24Z</dc:date>
    <item>
      <title>ArcGIS Pro 2.8.4: The Python If statement fails to work,</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcgis-pro-2-8-4-the-python-if-statement-fails-to/m-p/1186868#M56618</link>
      <description>&lt;P&gt;ArcGIS Pro 2.8.4: The Python If statement fails to work,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the screenshot below, I wanted to apply a simple if statement but fails to work and ends up with an error&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-----&lt;/P&gt;&lt;P&gt;def Reclass(Confinement):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if Confinement == Confined:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return 1500&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return 0&lt;/P&gt;&lt;P&gt;-----&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What could be the issue here?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The data is attached&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Clip_784.jpg" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/44519i76F50B236F97A3B8/image-size/large?v=v2&amp;amp;px=999" role="button" title="Clip_784.jpg" alt="Clip_784.jpg" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Clip_785.jpg" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/44520i0819441FD02DCAB3/image-size/large?v=v2&amp;amp;px=999" role="button" title="Clip_785.jpg" alt="Clip_785.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jun 2022 17:10:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcgis-pro-2-8-4-the-python-if-statement-fails-to/m-p/1186868#M56618</guid>
      <dc:creator>JamalNUMAN</dc:creator>
      <dc:date>2022-06-27T17:10:22Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Pro 2.8.4: The Python If statement fails to work,</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcgis-pro-2-8-4-the-python-if-statement-fails-to/m-p/1186872#M56619</link>
      <description>&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;Confinement == "Confined"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;and it should be, with a python parser&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Reclass(!Confinement!)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;to invoke it.&amp;nbsp; Note the enclosing ! marks&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jun 2022 17:14:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcgis-pro-2-8-4-the-python-if-statement-fails-to/m-p/1186872#M56619</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2022-06-27T17:14:24Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Pro 2.8.4: The Python If statement fails to work,</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcgis-pro-2-8-4-the-python-if-statement-fails-to/m-p/1186874#M56620</link>
      <description>&lt;P&gt;Code Block:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;def Reclass(Confinement):
    if Confinement == 'Confined':
        return 1500
    else:
        return 0&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jun 2022 17:17:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcgis-pro-2-8-4-the-python-if-statement-fails-to/m-p/1186874#M56620</guid>
      <dc:creator>JayantaPoddar</dc:creator>
      <dc:date>2022-06-27T17:17:57Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Pro 2.8.4: The Python If statement fails to work,</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcgis-pro-2-8-4-the-python-if-statement-fails-to/m-p/1186887#M56623</link>
      <description>&lt;P&gt;Thank you JayantaPoddar for the help. It works fine&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;------&lt;/P&gt;&lt;P&gt;def Reclass(Confinement):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if Confinement == 'Confined':&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return 1500&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return 0&lt;/P&gt;&lt;P&gt;--------&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Clip_786.jpg" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/44521i832377B5AD873CAB/image-size/large?v=v2&amp;amp;px=999" role="button" title="Clip_786.jpg" alt="Clip_786.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jun 2022 17:30:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcgis-pro-2-8-4-the-python-if-statement-fails-to/m-p/1186887#M56623</guid>
      <dc:creator>JamalNUMAN</dc:creator>
      <dc:date>2022-06-27T17:30:36Z</dc:date>
    </item>
  </channel>
</rss>

