<?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: I need to run a Calculate on a field in a hosted feature layer in ArcGIS REST APIs and Services Questions</title>
    <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/i-need-to-run-a-calculate-on-a-field-in-a-hosted/m-p/385267#M1861</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Worked. Thanks very much!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 30 Jun 2016 16:56:10 GMT</pubDate>
    <dc:creator>AllanLambert</dc:creator>
    <dc:date>2016-06-30T16:56:10Z</dc:date>
    <item>
      <title>I need to run a Calculate on a field in a hosted feature layer</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/i-need-to-run-a-calculate-on-a-field-in-a-hosted/m-p/385265#M1859</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;IMG alt="CalcGrid.gif" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/209973_CalcGrid.gif" style="width: 620px; height: 400px;" /&gt;I have a Damage Assessment feature layer hosted on AGOL with a web map.&amp;nbsp;&amp;nbsp; Along with Domain controlled fields are Estimated % of Damage, Estimated $ Amt of Damage and a prepopulated Dwelling Value field.&amp;nbsp; Field type is Double on these 3 fields. 50k points filtered down to only those edited with Est % Damage. I need to either&lt;/P&gt;&lt;P&gt;1.&amp;nbsp; Calc (Est $ Damage = DwellingVal * Est % Damage) on the fly as the user enters data for each point.&lt;/P&gt;&lt;P&gt;2.&amp;nbsp; Create a URL to Calc (Est $ Damage = DwellingVal * Est % Damage) where (Est % Damage is &amp;gt;0).&amp;nbsp; AGOL times out&amp;nbsp;&amp;nbsp;&amp;nbsp; calc-ing the 50k records so I think the Where clause is necessary to only capture the 500 or 5000 that are damaged.&lt;/P&gt;&lt;P&gt;3.&amp;nbsp; I'm open to ANY suggestion!&amp;nbsp; Thanks. Allan&lt;/P&gt;&lt;P&gt;I can't get the REST API grid to work. The error says that the calcexpression is invalid and Object reference not set....:&lt;/P&gt;&lt;P&gt;Where: PercentDamage &amp;gt; 0&lt;/P&gt;&lt;P&gt;"calcExpression":[{"field" : "EstDollarDamage", "sqlExpression" : "DwellingVal*PercentDamage*.01"}]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fservices5.arcgis.com%2FcA4ofagPaJJ7qhEz%2Farcgis%2Frest%2Fservices%2FDamageAssessment_O_only%2FFeatureServer%2F0%2Fcalculate%28where%3D%E2%80%9DPercentDamage" rel="nofollow" target="_blank"&gt;http://services5.arcgis.com/cA4ofagPaJJ7qhEz/arcgis/rest/services/DamageAssessment_O_only/FeatureServer/0/calculate(where=”PercentDamage&lt;/A&gt; &amp;gt; 10 2”,calcExpression={“field”: “EstDollarDamage”,“sqlexpression” : "DwellingVal*PercentDamage*.01"})&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jun 2016 17:43:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/i-need-to-run-a-calculate-on-a-field-in-a-hosted/m-p/385265#M1859</guid>
      <dc:creator>AllanLambert</dc:creator>
      <dc:date>2016-06-29T17:43:30Z</dc:date>
    </item>
    <item>
      <title>Re: I need to run a Calculate on a field in a hosted feature layer</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/i-need-to-run-a-calculate-on-a-field-in-a-hosted/m-p/385266#M1860</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Since you are using an HTML form for the calculation, you do not need to put "calcExpression:" in the box. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just put the portion between the square brackets in the box (including the square brackets). This would go in the box:&lt;/P&gt;&lt;P&gt;[{"field" : "EstDollarDamage", "sqlExpression" : "DwellingVal*PercentDamage*.01"}]&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jun 2016 04:34:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/i-need-to-run-a-calculate-on-a-field-in-a-hosted/m-p/385266#M1860</guid>
      <dc:creator>RandyBurton</dc:creator>
      <dc:date>2016-06-30T04:34:02Z</dc:date>
    </item>
    <item>
      <title>Re: I need to run a Calculate on a field in a hosted feature layer</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/i-need-to-run-a-calculate-on-a-field-in-a-hosted/m-p/385267#M1861</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Worked. Thanks very much!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jun 2016 16:56:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/i-need-to-run-a-calculate-on-a-field-in-a-hosted/m-p/385267#M1861</guid>
      <dc:creator>AllanLambert</dc:creator>
      <dc:date>2016-06-30T16:56:10Z</dc:date>
    </item>
  </channel>
</rss>

