<?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: ESRI Javascript API Calculate Field in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esri-javascript-api-calculate-field/m-p/428041#M39356</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Paul,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;You have to provide an array containing each graphic (that is why I said that this is not easily done with JS API);&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 16 Nov 2016 14:13:58 GMT</pubDate>
    <dc:creator>RobertScheitlin__GISP</dc:creator>
    <dc:date>2016-11-16T14:13:58Z</dc:date>
    <item>
      <title>ESRI Javascript API Calculate Field</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esri-javascript-api-calculate-field/m-p/428038#M39353</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to reset all the values in a field for all the features in a feature service.&amp;nbsp; Just like the field Calculator in ArcMAP.&amp;nbsp; Basically push a button and a whole field gets reset?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Nov 2016 21:37:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esri-javascript-api-calculate-field/m-p/428038#M39353</guid>
      <dc:creator>PaulVepraskas</dc:creator>
      <dc:date>2016-11-15T21:37:18Z</dc:date>
    </item>
    <item>
      <title>Re: ESRI Javascript API Calculate Field</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esri-javascript-api-calculate-field/m-p/428039#M39354</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Paul,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;This is not something that can be easily done in JS API. Your possibilities are to use FeatureLayer.applyEdits or create a GP service fro this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Nov 2016 22:29:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esri-javascript-api-calculate-field/m-p/428039#M39354</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2016-11-15T22:29:20Z</dc:date>
    </item>
    <item>
      <title>Re: ESRI Javascript API Calculate Field</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esri-javascript-api-calculate-field/m-p/428040#M39355</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks For the Reply Robert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With the FeatureLayer.applyEdits is there a way to do all of the features at once or will I have to do each OBJECTID individually?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Nov 2016 13:47:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esri-javascript-api-calculate-field/m-p/428040#M39355</guid>
      <dc:creator>PaulVepraskas</dc:creator>
      <dc:date>2016-11-16T13:47:15Z</dc:date>
    </item>
    <item>
      <title>Re: ESRI Javascript API Calculate Field</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esri-javascript-api-calculate-field/m-p/428041#M39356</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Paul,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;You have to provide an array containing each graphic (that is why I said that this is not easily done with JS API);&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Nov 2016 14:13:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esri-javascript-api-calculate-field/m-p/428041#M39356</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2016-11-16T14:13:58Z</dc:date>
    </item>
    <item>
      <title>Re: ESRI Javascript API Calculate Field</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esri-javascript-api-calculate-field/m-p/428042#M39357</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In one of my apps, I use applyEdits to update a collection of features (featureSet) with the click of a button. The user selected the new attributes from a series of combo boxes and clicked the button. In the button click function, my code looked like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;array.forEach(featureSet, function (feature) {
&amp;nbsp;&amp;nbsp;&amp;nbsp; feature.attributes.Priority = registry.byId('cboPriority').get("value");
&amp;nbsp;&amp;nbsp;&amp;nbsp; feature.attributes.Management = registry.byId('cboManagement').get("value");
&amp;nbsp;&amp;nbsp;&amp;nbsp; feature.attributes.Criteria = registry.byId('cboCriteria').get("value");
});

layerFeatureLayer.applyEdits(null, featureSet, null, function () { console.log("Features updated!"); }, function (error) { console.log("Features not updated! ", error); });
&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;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 19:15:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esri-javascript-api-calculate-field/m-p/428042#M39357</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2021-12-11T19:15:58Z</dc:date>
    </item>
    <item>
      <title>Re: ESRI Javascript API Calculate Field</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esri-javascript-api-calculate-field/m-p/428043#M39358</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That worked!&amp;nbsp; Thanks Ken!&amp;nbsp; &lt;/P&gt;&lt;P&gt;Did a query to select all features then ran that array.&amp;nbsp; Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Nov 2016 16:02:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esri-javascript-api-calculate-field/m-p/428043#M39358</guid>
      <dc:creator>PaulVepraskas</dc:creator>
      <dc:date>2016-11-16T16:02:31Z</dc:date>
    </item>
  </channel>
</rss>

