<?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: Update Features from JSON in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-features-from-json/m-p/600312#M56134</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1. make query on the feature layer and select the features you want to update&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. loop on the result set&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. for each feature applyEdits&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; layerForEdit.applyEdits(null, [newGraphic], null, successApplyGeometry, failApplyGeometry);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. newGraphic &lt;STRONG&gt;must&lt;/STRONG&gt; have the same ObjectID with the selected in order to find and update the correct feature.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so try the same with &lt;STRONG&gt;objectid&lt;/STRONG&gt; on the Graphic's attribute list. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 09 May 2016 14:11:16 GMT</pubDate>
    <dc:creator>PanagiotisPapadopoulos</dc:creator>
    <dc:date>2016-05-09T14:11:16Z</dc:date>
    <item>
      <title>Update Features from JSON</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-features-from-json/m-p/600310#M56132</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi All - I want to update a feature attribute that are already being present in the geodatabase with a JSON format. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is the detailed explanation of my above statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. I have a bunch of features in a database in a feature class&lt;/P&gt;&lt;P&gt;2. I have a feature access layer with the respective feature class&lt;/P&gt;&lt;P&gt;3. I have a JSON File which is having a unique identifier as a input and respective Attribute to update.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Example : &lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; "Update": [{&lt;/P&gt;&lt;P&gt;&amp;nbsp; "UID": "12345",&lt;/P&gt;&lt;P&gt;&amp;nbsp; "Attribute": "Completed"&lt;/P&gt;&lt;P&gt;&amp;nbsp; }, {&lt;/P&gt;&lt;P&gt;&amp;nbsp; "UID": "3456",&lt;/P&gt;&lt;P&gt;&amp;nbsp; "Attribute": "Pending"&lt;/P&gt;&lt;P&gt;&amp;nbsp; }]&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;4. How can I loop through the features and update the respective UID of the feature with the desired attribute ? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried with the Apply Edits and have no success over it ? Can someone please suggest. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 May 2016 11:40:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-features-from-json/m-p/600310#M56132</guid>
      <dc:creator>RavitejaViswanadha1</dc:creator>
      <dc:date>2016-05-09T11:40:31Z</dc:date>
    </item>
    <item>
      <title>Re: Update Features from JSON</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-features-from-json/m-p/600311#M56133</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Raviteja,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; The applyEdits function is exactly what you need to be using. Can you share your coding attempts to use applyEdits, so that we can try and find your issue?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 May 2016 13:48:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-features-from-json/m-p/600311#M56133</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2016-05-09T13:48:28Z</dc:date>
    </item>
    <item>
      <title>Re: Update Features from JSON</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-features-from-json/m-p/600312#M56134</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1. make query on the feature layer and select the features you want to update&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. loop on the result set&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. for each feature applyEdits&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; layerForEdit.applyEdits(null, [newGraphic], null, successApplyGeometry, failApplyGeometry);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. newGraphic &lt;STRONG&gt;must&lt;/STRONG&gt; have the same ObjectID with the selected in order to find and update the correct feature.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so try the same with &lt;STRONG&gt;objectid&lt;/STRONG&gt; on the Graphic's attribute list. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 May 2016 14:11:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-features-from-json/m-p/600312#M56134</guid>
      <dc:creator>PanagiotisPapadopoulos</dc:creator>
      <dc:date>2016-05-09T14:11:16Z</dc:date>
    </item>
  </channel>
</rss>

