<?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: Editor widget 4.15 in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/editor-widget-4-15/m-p/318143#M29341</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Markos,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not sure if this is exactly what you're looking for, but you could try watching the "state" property on the Editor.viewModel:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;editor&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;viewModel&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;watch&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"state"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;function&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;
   newValue&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
   oldValue&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
   propertyName&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
   target
&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
   console&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;log&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;
      propertyName &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;" changed from "&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; oldValue &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;" to "&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; newValue
   &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="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;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See it in action here:&amp;nbsp;&lt;A class="link-titled" href="https://codepen.io/annefitz/pen/PoPjwoQ" title="https://codepen.io/annefitz/pen/PoPjwoQ" rel="nofollow noopener noreferrer" target="_blank"&gt;https://codepen.io/annefitz/pen/PoPjwoQ&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Observe the change in state in the console.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anne&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 15:07:24 GMT</pubDate>
    <dc:creator>AnneFitz</dc:creator>
    <dc:date>2021-12-11T15:07:24Z</dc:date>
    <item>
      <title>Editor widget 4.15</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/editor-widget-4-15/m-p/318142#M29340</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I an using Editor widget 4.15 with update workflow.&amp;nbsp; I want to do additional pre-processing of the updated feature before it is posted (commit) to the feature layer. I could not figure out the best way to listen to an event when "Update" button is clicked.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Apr 2020 18:22:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/editor-widget-4-15/m-p/318142#M29340</guid>
      <dc:creator>MKY</dc:creator>
      <dc:date>2020-04-24T18:22:49Z</dc:date>
    </item>
    <item>
      <title>Re: Editor widget 4.15</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/editor-widget-4-15/m-p/318143#M29341</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Markos,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not sure if this is exactly what you're looking for, but you could try watching the "state" property on the Editor.viewModel:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;editor&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;viewModel&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;watch&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"state"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;function&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;
   newValue&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
   oldValue&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
   propertyName&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
   target
&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
   console&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;log&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;
      propertyName &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;" changed from "&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; oldValue &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;" to "&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; newValue
   &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="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;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See it in action here:&amp;nbsp;&lt;A class="link-titled" href="https://codepen.io/annefitz/pen/PoPjwoQ" title="https://codepen.io/annefitz/pen/PoPjwoQ" rel="nofollow noopener noreferrer" target="_blank"&gt;https://codepen.io/annefitz/pen/PoPjwoQ&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Observe the change in state in the console.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anne&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 15:07:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/editor-widget-4-15/m-p/318143#M29341</guid>
      <dc:creator>AnneFitz</dc:creator>
      <dc:date>2021-12-11T15:07:24Z</dc:date>
    </item>
    <item>
      <title>Re: Editor widget 4.15</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/editor-widget-4-15/m-p/318144#M29342</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Anne, thank you.&lt;/P&gt;&lt;P&gt;I have the following workflow and&amp;nbsp;not sure how to proceed.&lt;/P&gt;&lt;P&gt;In the editor tool I want to edit geometry and attribute. If the edited geometry&amp;nbsp;is invalid, i want to disable the "update" button on the editor widget. If the geometry is valid, I have to update an attribute field (in code) based on the new geometry and its relationship to another feature layer.&lt;/P&gt;&lt;P&gt;I hope it makes sense.&amp;nbsp; by the way, I use the sample code for sketch update validation.&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/latest/sample-code/sketch-update-validation/index.html" title="https://developers.arcgis.com/javascript/latest/sample-code/sketch-update-validation/index.html"&gt;Sketch update validation | ArcGIS API for JavaScript 4.15&lt;/A&gt;&amp;nbsp; for geometry validation&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Apr 2020 18:32:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/editor-widget-4-15/m-p/318144#M29342</guid>
      <dc:creator>MKY</dc:creator>
      <dc:date>2020-04-27T18:32:28Z</dc:date>
    </item>
    <item>
      <title>Re: Editor widget 4.15</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/editor-widget-4-15/m-p/318145#M29343</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use the &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#event-update"&gt;sketchViewModel.update&lt;/A&gt; event to see when the geometry is being edited (as they do in the Sketch Update Validation sample).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-EditorViewModel.html#featureFormViewModel"&gt;editorViewModel.featureFormViewModel&lt;/A&gt;&amp;nbsp;controls the Editor form - you should be able to use set &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-FeatureFormViewModel.html#valid"&gt;featureFormViewModel.valid&lt;/A&gt;&amp;nbsp;to false if the edited geometry is invalid, and that will disable the "update" button on the editor widget.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I haven't tested this out yet, but hopefully that will get you&amp;nbsp;going in the right direction! Let me know how it turns out.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Apr 2020 19:11:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/editor-widget-4-15/m-p/318145#M29343</guid>
      <dc:creator>AnneFitz</dc:creator>
      <dc:date>2020-04-27T19:11:17Z</dc:date>
    </item>
    <item>
      <title>Re: Editor widget 4.15</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/editor-widget-4-15/m-p/318146#M29344</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Anne, Thank you for you guidance!&amp;nbsp;I was able to&amp;nbsp;validate and implement.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Apr 2020 12:12:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/editor-widget-4-15/m-p/318146#M29344</guid>
      <dc:creator>MKY</dc:creator>
      <dc:date>2020-04-28T12:12:38Z</dc:date>
    </item>
  </channel>
</rss>

