<?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 arcgis.features.FeatureLayer --&amp;gt; calculate in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-features-featurelayer-gt-calculate/m-p/878116#M5010</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I would like to calculate a field value using the&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE class="" style="color: #000000; background: transparent; border: none; font-weight: bold;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;calculate&lt;/CODE&gt;&lt;SPAN class="" style="color: #555555; font-weight: bold;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #555555; font-weight: bold;"&gt;&lt;EM&gt;where&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #555555; background-color: #f0f0f0; font-weight: bold;"&gt;,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #555555; font-weight: bold;"&gt;&lt;EM&gt;calc_expression&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #555555; background-color: #f0f0f0; font-weight: bold;"&gt;,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #555555; font-weight: bold;"&gt;&lt;EM&gt;sql_format=’standard’&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN class="" style="color: #555555; font-weight: bold;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" style="color: #555555; font-weight: bold;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;operation of the &lt;CODE class="" style="color: #000000; background: transparent; border: none; font-weight: bold;"&gt;arcgis.features.&lt;/CODE&gt;&lt;CODE class="" style="color: #000000; background: transparent; border: none; font-weight: bold;"&gt;FeatureLayer&amp;nbsp;&lt;/CODE&gt;class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to fields that I want to multiply but&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;STRONG&gt;agg_result.layers[0].calculate(where="1=1",calc_expression={"field": "MIN_value","value" : "!poly_area! * &amp;nbsp;&amp;nbsp;&amp;nbsp;!MEAN_value!"},sql_format="standard")&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is throwing the following error:&amp;nbsp;&lt;SPAN class="" style="color: #b22b31; font-weight: bold;"&gt;TypeError&lt;/SPAN&gt;: unsupported operand type(s) for +: 'NoneType' and 'str'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="363412" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/363412_pastedImage_3.png" style="width: 620px; height: 405px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The CalculateField operation of arcpy is workinf fine:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;STRONG&gt;arcpy.management.CalculateField(agg_result.layers[0].url, "MAX_value", "!poly_area! * !MEAN_value!", &amp;nbsp;&amp;nbsp;&amp;nbsp;"PYTHON_9.3", None)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone tell me what I'm doing wrong?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 19 Jul 2017 15:39:13 GMT</pubDate>
    <dc:creator>TomPaschke</dc:creator>
    <dc:date>2017-07-19T15:39:13Z</dc:date>
    <item>
      <title>arcgis.features.FeatureLayer --&gt; calculate</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-features-featurelayer-gt-calculate/m-p/878116#M5010</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I would like to calculate a field value using the&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE class="" style="color: #000000; background: transparent; border: none; font-weight: bold;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;calculate&lt;/CODE&gt;&lt;SPAN class="" style="color: #555555; font-weight: bold;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #555555; font-weight: bold;"&gt;&lt;EM&gt;where&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #555555; background-color: #f0f0f0; font-weight: bold;"&gt;,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #555555; font-weight: bold;"&gt;&lt;EM&gt;calc_expression&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #555555; background-color: #f0f0f0; font-weight: bold;"&gt;,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #555555; font-weight: bold;"&gt;&lt;EM&gt;sql_format=’standard’&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN class="" style="color: #555555; font-weight: bold;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" style="color: #555555; font-weight: bold;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;operation of the &lt;CODE class="" style="color: #000000; background: transparent; border: none; font-weight: bold;"&gt;arcgis.features.&lt;/CODE&gt;&lt;CODE class="" style="color: #000000; background: transparent; border: none; font-weight: bold;"&gt;FeatureLayer&amp;nbsp;&lt;/CODE&gt;class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to fields that I want to multiply but&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;STRONG&gt;agg_result.layers[0].calculate(where="1=1",calc_expression={"field": "MIN_value","value" : "!poly_area! * &amp;nbsp;&amp;nbsp;&amp;nbsp;!MEAN_value!"},sql_format="standard")&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is throwing the following error:&amp;nbsp;&lt;SPAN class="" style="color: #b22b31; font-weight: bold;"&gt;TypeError&lt;/SPAN&gt;: unsupported operand type(s) for +: 'NoneType' and 'str'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="363412" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/363412_pastedImage_3.png" style="width: 620px; height: 405px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The CalculateField operation of arcpy is workinf fine:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;STRONG&gt;arcpy.management.CalculateField(agg_result.layers[0].url, "MAX_value", "!poly_area! * !MEAN_value!", &amp;nbsp;&amp;nbsp;&amp;nbsp;"PYTHON_9.3", None)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone tell me what I'm doing wrong?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Jul 2017 15:39:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-features-featurelayer-gt-calculate/m-p/878116#M5010</guid>
      <dc:creator>TomPaschke</dc:creator>
      <dc:date>2017-07-19T15:39:13Z</dc:date>
    </item>
  </channel>
</rss>

