<?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 calculate feild using phyton if function in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/calculate-feild-using-phyton-if-function/m-p/1073239#M42586</link>
    <description>&lt;P&gt;hello, i want to calculate feild using phyton if function to do the following :&lt;/P&gt;&lt;P&gt;if Height_Delta is greater than 0 write in the status cell " Uprise"&lt;/P&gt;&lt;P&gt;if Height_Delta is less than 0 write in the status cell "Downrise"&lt;/P&gt;&lt;P&gt;image is attached&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="444.PNG" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/17170i98EBDA5BDAE772A5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="444.PNG" alt="444.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;can anyone can help with the code ?&lt;/P&gt;&lt;P&gt;thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 28 Jun 2021 16:00:11 GMT</pubDate>
    <dc:creator>matu89</dc:creator>
    <dc:date>2021-06-28T16:00:11Z</dc:date>
    <item>
      <title>calculate feild using phyton if function</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/calculate-feild-using-phyton-if-function/m-p/1073239#M42586</link>
      <description>&lt;P&gt;hello, i want to calculate feild using phyton if function to do the following :&lt;/P&gt;&lt;P&gt;if Height_Delta is greater than 0 write in the status cell " Uprise"&lt;/P&gt;&lt;P&gt;if Height_Delta is less than 0 write in the status cell "Downrise"&lt;/P&gt;&lt;P&gt;image is attached&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="444.PNG" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/17170i98EBDA5BDAE772A5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="444.PNG" alt="444.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;can anyone can help with the code ?&lt;/P&gt;&lt;P&gt;thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Jun 2021 16:00:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/calculate-feild-using-phyton-if-function/m-p/1073239#M42586</guid>
      <dc:creator>matu89</dc:creator>
      <dc:date>2021-06-28T16:00:11Z</dc:date>
    </item>
    <item>
      <title>Re: calculate feild using phyton if function</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/calculate-feild-using-phyton-if-function/m-p/1073274#M42589</link>
      <description>&lt;LI-CODE lang="python"&gt;Height_Delta = 5  # ---- example value

["Down_rise", "Up_rise"][Height_Delta &amp;gt; 0]
'Up_rise'&lt;/LI-CODE&gt;&lt;P&gt;Remember to put ! marks around Height_Delta ( !Height_Delta! ) since it is a python field calculator expression&lt;/P&gt;</description>
      <pubDate>Mon, 28 Jun 2021 16:30:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/calculate-feild-using-phyton-if-function/m-p/1073274#M42589</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-06-28T16:30:26Z</dc:date>
    </item>
    <item>
      <title>Re: calculate feild using phyton if function</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/calculate-feild-using-phyton-if-function/m-p/1073320#M42595</link>
      <description>&lt;P&gt;can u tell where to write each line of the code in the feild calculator window ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;image is attached here :&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="555.PNG" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/17194i4C1A3AAA42F63222/image-size/medium?v=v2&amp;amp;px=400" role="button" title="555.PNG" alt="555.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; thank u&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Jun 2021 17:05:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/calculate-feild-using-phyton-if-function/m-p/1073320#M42595</guid>
      <dc:creator>matu89</dc:creator>
      <dc:date>2021-06-28T17:05:41Z</dc:date>
    </item>
    <item>
      <title>Re: calculate feild using phyton if function</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/calculate-feild-using-phyton-if-function/m-p/1073388#M42610</link>
      <description>&lt;LI-CODE lang="python"&gt;["Down_rise", "Up_rise"][!Height_Delta! &amp;gt; 0]&lt;/LI-CODE&gt;&lt;P&gt;goes under Status =&amp;nbsp; line&lt;/P&gt;&lt;P&gt;not in the code block&lt;/P&gt;&lt;P&gt;some background&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/help/data/tables/fundamentals-of-field-calculations.htm" target="_blank"&gt;Fundamentals of field calculations—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Jun 2021 19:12:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/calculate-feild-using-phyton-if-function/m-p/1073388#M42610</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-06-28T19:12:50Z</dc:date>
    </item>
    <item>
      <title>Re: calculate feild using phyton if function</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/calculate-feild-using-phyton-if-function/m-p/1073405#M42613</link>
      <description>&lt;P&gt;Another alternative.&lt;/P&gt;&lt;P&gt;Expression:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;Slope(!Height_Delta!)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Code Block:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;def Slope(HT):
    if HT&amp;lt; 0:
        return 'Downrise'
    else:
        return 'Uprise'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Jun 2021 19:29:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/calculate-feild-using-phyton-if-function/m-p/1073405#M42613</guid>
      <dc:creator>JayantaPoddar</dc:creator>
      <dc:date>2021-06-28T19:29:17Z</dc:date>
    </item>
    <item>
      <title>Re: calculate feild using phyton if function</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/calculate-feild-using-phyton-if-function/m-p/1073497#M42626</link>
      <description>&lt;P&gt;expression&lt;/P&gt;&lt;LI-CODE lang="python"&gt;code_block(!Height_Delta!)&lt;/LI-CODE&gt;&lt;P&gt;code block&lt;/P&gt;&lt;LI-CODE lang="python"&gt;def code_block(fld)
    """code block isn't really needed"""
    return ["Down_rise", "Up_rise"][fld &amp;gt; 0]&lt;/LI-CODE&gt;&lt;P&gt;but as you can see it really isn't needed&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Jun 2021 22:08:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/calculate-feild-using-phyton-if-function/m-p/1073497#M42626</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-06-28T22:08:51Z</dc:date>
    </item>
  </channel>
</rss>

