<?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: Python for 'Calculate Field' in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/python-for-calculate-field/m-p/617947#M20520</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Many thanks Richard!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 05 Apr 2018 16:48:31 GMT</pubDate>
    <dc:creator>ChrisMarsh2</dc:creator>
    <dc:date>2018-04-05T16:48:31Z</dc:date>
    <item>
      <title>Python for 'Calculate Field'</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/python-for-calculate-field/m-p/617945#M20518</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have two columns in my table: 'Join_Count' and 'SEG_Count'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to use the 'Calculate Field' tool so that if the number in the 'SEG_Count' column is higher than the number shown in the 'Join_Count' column,&amp;nbsp;calculate field will change the number in the 'SEG_Count' column to be whatever number is shown in the 'Join_Count' column; however I cannot work out the Python script to do this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be appreciated,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Apr 2018 14:18:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/python-for-calculate-field/m-p/617945#M20518</guid>
      <dc:creator>ChrisMarsh2</dc:creator>
      <dc:date>2018-04-05T14:18:58Z</dc:date>
    </item>
    <item>
      <title>Re: Python for 'Calculate Field'</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/python-for-calculate-field/m-p/617946#M20519</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do the calculation on the SEG_Count field with the following settings (I assumed that there are no Null values in these fields):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Parser: Python&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code Block: Checked&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pre-Logic Code Block&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;def SEG_Count_Cap(SEG_Count, Join_Count):
&amp;nbsp; if SEG_Count &amp;gt; Join_Count:
&amp;nbsp;&amp;nbsp;&amp;nbsp; return Join_Count
&amp;nbsp; else:
&amp;nbsp;&amp;nbsp;&amp;nbsp; return SEG_Count‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SEG_Count:&lt;/P&gt;&lt;P&gt;SEG_Count_Cap(!SEG_Count!, !Join_Count!)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 02:24:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/python-for-calculate-field/m-p/617946#M20519</guid>
      <dc:creator>RichardFairhurst</dc:creator>
      <dc:date>2021-12-12T02:24:08Z</dc:date>
    </item>
    <item>
      <title>Re: Python for 'Calculate Field'</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/python-for-calculate-field/m-p/617947#M20520</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Many thanks Richard!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Apr 2018 16:48:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/python-for-calculate-field/m-p/617947#M20520</guid>
      <dc:creator>ChrisMarsh2</dc:creator>
      <dc:date>2018-04-05T16:48:31Z</dc:date>
    </item>
  </channel>
</rss>

