<?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 Feature  Error in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-feature-error/m-p/69753#M6126</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nadir,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;I have not tried to edit a featurelayer that is not loaded in my map before. I think your issues may&amp;nbsp;be that you did not specify any outFields.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; UpdateValidLayer &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;esri&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;layers&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;FeatureLayer&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;featureServiceValidURl&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
   outFields&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"*"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&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;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Dec 2021 22:40:30 GMT</pubDate>
    <dc:creator>RobertScheitlin__GISP</dc:creator>
    <dc:date>2021-12-10T22:40:30Z</dc:date>
    <item>
      <title>Update Feature  Error</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-feature-error/m-p/69733#M6106</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;i am trying to update a feature using feature service.My geodatabase is versioned.below is my code&amp;nbsp;&lt;/P&gt;&lt;P&gt;var UpdateAttr = {&lt;BR /&gt;اسم_الشركة: test_2,&lt;BR /&gt;Mineral :validFeature.attributes.Mineral,&lt;BR /&gt; Geologist : validFeature.attributes.Geologist,&lt;BR /&gt; Duration : validFeature.attributes.Duration,&lt;BR /&gt; End_Date : validFeature.attributes.End_Date,//"",&lt;BR /&gt; Decision_Type :validFeature.attributes.Decision_Type,//"",&lt;BR /&gt; Location : validFeature.attributes.Location,//&lt;BR /&gt; Decision_Date : validFeature.attributes.Decision_Date,//"",&lt;BR /&gt; Decision_No : validFeature.attributes.Decision_Date,//"",&lt;BR /&gt; Visible_Code :validFeature.attributes.Visible_Code,//"",&lt;BR /&gt; Emirat_Code : validFeature.attributes.Emirat_Code,//&lt;BR /&gt; Mineral_Code : validFeature.attributes.Mineral_Code,//"",&lt;BR /&gt; Complex_Code : validFeature.attributes.Complex_Code,//"",&lt;BR /&gt; City_Code :validFeature.attributes.City_Code,//"",&lt;BR /&gt; Status_Code :validFeature.attributes.Status_Code,&lt;BR /&gt; Emirate : validFeature.attributes.Emirate,*/&lt;BR /&gt;Governorate : "ddd",&lt;BR /&gt; };&lt;BR /&gt; var UpdateValidLayer = new esri.layers.FeatureLayer(featureServiceValidURl);&lt;BR /&gt; var MyUpdateGraphic = new esri.Graphic(null, null, UpdateAttr);&lt;BR /&gt; var updateFeatures = [];&lt;BR /&gt; updateFeatures.push(MyUpdateGraphic);&lt;BR /&gt; UpdateValidLayer.applyEdits(null, updateFeatures, null, function (addResults, updateResults, deleteResults) {&lt;BR /&gt;&amp;nbsp; dynamicMapServiceLayer.refresh();&lt;BR /&gt;&amp;nbsp; console.log("Apply Edits Successfully:");&lt;BR /&gt;&amp;nbsp; alert("updated Successfully");&lt;BR /&gt; }, function (err) {&lt;BR /&gt; alert(err.message+"___"+err.code+"_________"+err.id);&lt;BR /&gt; console.log("Apply Edits Failed: ",err.message+err.code);&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;Always through error "Unabale to complete operation.Error Code is 400".i have this code many times in my other projects.But this time throwing error.&lt;/P&gt;&lt;P&gt;i also try to update feature using arcgis server webinterface.it works from the webinterface.so&lt;/P&gt;&lt;P&gt;Pls help.Thanks is advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 May 2019 12:28:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-feature-error/m-p/69733#M6106</guid>
      <dc:creator>NadirHussain</dc:creator>
      <dc:date>2019-05-22T12:28:20Z</dc:date>
    </item>
    <item>
      <title>Re: Update Feature  Error</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-feature-error/m-p/69734#M6107</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nadir,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;What is this?&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Emirate : validFeature.attributes.Emirate,&lt;SPAN style="color: #ff0000; font-size: 22px;"&gt;&lt;STRONG&gt;*/&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;That is not a proper comment and would be a syntax error.&lt;/P&gt;&lt;P&gt;Also when you get to the last property do not use a comma.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Governorate : "ddd"&lt;SPAN style="font-size: 22px;"&gt;&lt;STRONG style="color: #ff0000; "&gt;,&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 May 2019 12:36:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-feature-error/m-p/69734#M6107</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2019-05-22T12:36:42Z</dc:date>
    </item>
    <item>
      <title>Re: Update Feature  Error</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-feature-error/m-p/69735#M6108</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;dear Robert&amp;nbsp;&lt;/P&gt;&lt;P&gt;I change the remarks but it is still throwing same error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 May 2019 12:43:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-feature-error/m-p/69735#M6108</guid>
      <dc:creator>NadirHussain</dc:creator>
      <dc:date>2019-05-22T12:43:53Z</dc:date>
    </item>
    <item>
      <title>Re: Update Feature  Error</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-feature-error/m-p/69736#M6109</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nadir,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; 1. Have you successfully updated a field that has it's name in a different language?&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;اسم_الشركة: test_2,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&amp;nbsp; 2. Is this a table you are updating and not a feature with geometry?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 May 2019 12:50:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-feature-error/m-p/69736#M6109</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2019-05-22T12:50:59Z</dc:date>
    </item>
    <item>
      <title>Re: Update Feature  Error</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-feature-error/m-p/69737#M6110</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Robert,&lt;/P&gt;&lt;P&gt;&amp;nbsp;I update from web interface of arcgis server with the arabic name of field.Its updated successfully.But this is first time i am updating feature service having table name in arabic.the other thing i just want to upadate attribute vales of a feature not the geometry.i cant say this arabic name is the reason for throwing error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 May 2019 12:59:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-feature-error/m-p/69737#M6110</guid>
      <dc:creator>NadirHussain</dc:creator>
      <dc:date>2019-05-22T12:59:18Z</dc:date>
    </item>
    <item>
      <title>Re: Update Feature  Error</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-feature-error/m-p/69738#M6111</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Robert,&lt;/P&gt;&lt;P&gt;&amp;nbsp;i put try catch and it is throwing the fallowing error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unable to complete operation.___400_________ObjectId field is missing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my table OBJECTID_1 is the objectID column.this can be the reason.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 May 2019 13:06:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-feature-error/m-p/69738#M6111</guid>
      <dc:creator>NadirHussain</dc:creator>
      <dc:date>2019-05-22T13:06:48Z</dc:date>
    </item>
    <item>
      <title>Re: Update Feature  Error</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-feature-error/m-p/69739#M6112</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nadir,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;You are doing an update so normally I would get the existing graphic and not create a new graphic. So the way I see it is that because you are creating a new graphic it is getting a new ObjectId and this is an issue.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 May 2019 13:07:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-feature-error/m-p/69739#M6112</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2019-05-22T13:07:38Z</dc:date>
    </item>
    <item>
      <title>Re: Update Feature  Error</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-feature-error/m-p/69740#M6113</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Robert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; This is my updated code.But it is throwing same error.Pls help.&lt;/P&gt;&lt;P&gt;function updateValidFeature(validFeature,strHello,strHello1){&lt;/P&gt;&lt;P&gt;try{&lt;BR /&gt; var UpdateValidLayer = new esri.layers.FeatureLayer(featureServiceValidURl);&lt;BR /&gt; var graphic = validFeature;&lt;BR /&gt; graphic.setAttributes({Governorate: "Riyadh",Status_Code:"2"});&lt;BR /&gt; var updateFeatures = [];&lt;BR /&gt; updateFeatures.push(graphic);&lt;BR /&gt; UpdateValidLayer.applyEdits(null, updateFeatures, null, function (addResults, updateResults, deleteResults) {&lt;BR /&gt; dynamicMapServiceLayer.refresh();&lt;BR /&gt; console.log("Apply Edits Successfully:");&lt;BR /&gt; alert("updated Successfully");&lt;BR /&gt; }, function (err) {&lt;BR /&gt; alert(err.message+"___"+err.code+"_________"+err.details);&lt;BR /&gt; console.log("Apply Edits Failed: ",err.message+err.code);&lt;BR /&gt; });&lt;BR /&gt; }&lt;BR /&gt; catch(Ex){&lt;BR /&gt; alert(Ex.message);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 May 2019 07:20:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-feature-error/m-p/69740#M6113</guid>
      <dc:creator>NadirHussain</dc:creator>
      <dc:date>2019-05-23T07:20:00Z</dc:date>
    </item>
    <item>
      <title>Re: Update Feature  Error</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-feature-error/m-p/69741#M6114</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Robert,&lt;/P&gt;&lt;P&gt;I try to update from web interface of arcgis server it through the same error.you can check this with attached &lt;IMG alt="" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/448273_Untitled.png" /&gt;image.What can be the reason.I tried to insert the new record and its inserted successfully.I face this problem updation and deletion of record.&lt;/P&gt;&lt;P&gt;pls help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 May 2019 10:19:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-feature-error/m-p/69741#M6114</guid>
      <dc:creator>NadirHussain</dc:creator>
      <dc:date>2019-05-23T10:19:15Z</dc:date>
    </item>
    <item>
      <title>Re: Update Feature  Error</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-feature-error/m-p/69742#M6115</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Robert,&lt;/P&gt;&lt;P&gt;i successfully update the record from arcgis webinterface.but still facing error updating from my code.&lt;/P&gt;&lt;P&gt;var UpdateAttr = {OBJECTID_1:validFeature.attributes.OBJECTID_1,اسم_الشركة: "test_25"}; &lt;BR /&gt; var UpdateValidLayer = new esri.layers.FeatureLayer(featureServiceExpiredURl);&lt;BR /&gt; var feature =validFeature;// new esri.Graphic(null, null, UpdateAttr);&lt;BR /&gt; //graphic.setAttributes({OBJECTID :validFeature.attributes.OBJECTID_1,Governorate: "Riyadh",Status_Code:"2"});&lt;BR /&gt; var updateFeatures = [];&lt;BR /&gt; updateFeatures.push(feature);&lt;BR /&gt; UpdateValidLayer.applyEdits(null, updateFeatures,null, function (addResults, updateResults, deleteResults) {&lt;BR /&gt; //dynamicMapServiceLayer.refresh();&lt;BR /&gt; console.log("Apply Edits Successfully:", updateResults);&lt;BR /&gt; alert("updated Successfully");&lt;BR /&gt; }, function (err) {&lt;BR /&gt; alert(err.message+"_________"+err.code+"_________"+err.details+"_______"+err);&lt;BR /&gt; console.log("Apply Edits Failed: ",err);&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;this is my last code this is the error which i am facing "Cannot read property 'attributes' of undefined ".i dont understand which variable is udefined.pls help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 May 2019 12:09:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-feature-error/m-p/69742#M6115</guid>
      <dc:creator>NadirHussain</dc:creator>
      <dc:date>2019-05-23T12:09:11Z</dc:date>
    </item>
    <item>
      <title>Re: Update Feature  Error</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-feature-error/m-p/69743#M6116</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nadir,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Have you verified that&amp;nbsp;&lt;SPAN style="background-color: #ffffff;"&gt;validFeature is not null and is a graphic?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 May 2019 12:31:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-feature-error/m-p/69743#M6116</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2019-05-23T12:31:55Z</dc:date>
    </item>
    <item>
      <title>Re: Update Feature  Error</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-feature-error/m-p/69744#M6117</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;nbsp;Dear Robert,&lt;/P&gt;&lt;P&gt;&amp;nbsp;i check validfeature is not null and i replace this staetment with&amp;nbsp;&lt;/P&gt;&lt;P&gt;var feature = new esri.Graphic(null, null, UpdateAttr);&lt;/P&gt;&lt;P&gt;i also check feature is not null.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 May 2019 12:39:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-feature-error/m-p/69744#M6117</guid>
      <dc:creator>NadirHussain</dc:creator>
      <dc:date>2019-05-23T12:39:32Z</dc:date>
    </item>
    <item>
      <title>Re: Update Feature  Error</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-feature-error/m-p/69745#M6118</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nadir,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Remember I told you that would not work because you are trying to update so you need the original features ObjectId and geometry.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 May 2019 12:46:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-feature-error/m-p/69745#M6118</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2019-05-23T12:46:05Z</dc:date>
    </item>
    <item>
      <title>Re: Update Feature  Error</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-feature-error/m-p/69746#M6119</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Robert,&lt;/P&gt;&lt;P&gt;&amp;nbsp; i tried with both ways.But its not work.&lt;/P&gt;&lt;P&gt;&amp;nbsp; var graphic=validFeature weather this statment is right or wrong but not throwing any error&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 May 2019 12:59:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-feature-error/m-p/69746#M6119</guid>
      <dc:creator>NadirHussain</dc:creator>
      <dc:date>2019-05-23T12:59:51Z</dc:date>
    </item>
    <item>
      <title>Re: Update Feature  Error</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-feature-error/m-p/69747#M6120</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nadir,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;I am lost then. When updating features in a FeatureService I just get the graphic (feature) I am updating and make my change to the attributes or geometry and then add that graphic to an array and pass that array to the update portion of applyEdits and it works.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 May 2019 13:22:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-feature-error/m-p/69747#M6120</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2019-05-23T13:22:09Z</dc:date>
    </item>
    <item>
      <title>Re: Update Feature  Error</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-feature-error/m-p/69748#M6121</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Robert,&lt;/P&gt;&lt;P&gt;&amp;nbsp;Can you share your code so that i can match and figure out where is i am making mistake.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your cooperation&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 May 2019 13:43:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-feature-error/m-p/69748#M6121</guid>
      <dc:creator>NadirHussain</dc:creator>
      <dc:date>2019-05-23T13:43:49Z</dc:date>
    </item>
    <item>
      <title>Re: Update Feature  Error</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-feature-error/m-p/69749#M6122</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;        &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; graphic &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; polyFeatLayer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;graphics&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;polyFeatLayer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;graphics&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;length &lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;  
  
        &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; currentDate &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;Date&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;  
        &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; dateString &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;currentDate&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;getMonth&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"/"&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; currentDate&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;getDate&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"/"&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; currentDate&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;getFullYear&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;  
        &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; fixedDate &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;Date&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;parse&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;dateString&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;  
  
        graphic&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;attributes&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"DT_ADDED"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; fixedDate&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;    
        polyFeatLayer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;applyEdits&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;null&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;graphic&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;null&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&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;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 22:40:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-feature-error/m-p/69749#M6122</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-10T22:40:26Z</dc:date>
    </item>
    <item>
      <title>Re: Update Feature  Error</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-feature-error/m-p/69750#M6123</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Robert,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;the above code also not work.i think some problem in the code given below which i am using&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;var queryTask = new esri.tasks.QueryTask(RestServiceUrl + "/0");//Query For Valid Licences&lt;BR /&gt;var query = new esri.tasks.Query();&lt;BR /&gt;query.returnGeometry = true;&lt;BR /&gt;query.outFields = ["*"];&lt;BR /&gt;query.where = "OBJECTID = '" + strLicsNumber + "'";&lt;BR /&gt;queryTask.execute(query, function (resultset) {&lt;BR /&gt;if(resultset.features.length&amp;gt;0){&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;validFeature = resultset.features[0]; ----&amp;gt;i am getting the feature here this line is right or wrong&amp;nbsp;&lt;BR /&gt;updateValidFeature(&lt;SPAN&gt;validFeature&amp;nbsp;&lt;/SPAN&gt;,strHello,strHello1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;function updateValidFeature(validFeature,strHello,strHello1){&lt;BR /&gt;try {&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;var UpdateValidLayer = new esri.layers.FeatureLayer(featureServiceValidURl);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(validFeature!=null){&lt;BR /&gt;alert("ff");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;}&lt;BR /&gt;validFeature["DISTANCE "]="100.00";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;UpdateValidLayer.applyEdits(null,[validFeature],null, function (addResults, updateResults, deleteResults) {&lt;BR /&gt;console.log("Apply Edits Successfully:", updateResults);&lt;BR /&gt;alert("updated Successfully");&lt;BR /&gt;}, function (err) {&lt;BR /&gt;alert(err.message+"_________"+err.code+"_________"+err.details+"_______"+err);&lt;BR /&gt;console.log("Apply Edits Failed: ",err);&lt;BR /&gt;});&lt;BR /&gt;}&lt;BR /&gt;catch(Ex){&lt;BR /&gt;alert(Ex.message);&lt;BR /&gt;}&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;////////////////////&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pls check.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 May 2019 20:20:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-feature-error/m-p/69750#M6123</guid>
      <dc:creator>NadirHussain</dc:creator>
      <dc:date>2019-05-23T20:20:36Z</dc:date>
    </item>
    <item>
      <title>Re: Update Feature  Error</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-feature-error/m-p/69751#M6124</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nadir,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;Is the distance field a string type?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 May 2019 20:26:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-feature-error/m-p/69751#M6124</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2019-05-23T20:26:13Z</dc:date>
    </item>
    <item>
      <title>Re: Update Feature  Error</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-feature-error/m-p/69752#M6125</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Robert,&lt;/P&gt;&lt;P&gt;its double.But i already changed in my code.the fallowing error coming&lt;/P&gt;&lt;P&gt;Cannot read property 'attributes' of undefined.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what is undefined in this small code.this make me crazy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 May 2019 20:36:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-feature-error/m-p/69752#M6125</guid>
      <dc:creator>NadirHussain</dc:creator>
      <dc:date>2019-05-23T20:36:03Z</dc:date>
    </item>
  </channel>
</rss>

