<?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: Reopen popup with updated attributes in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/reopen-popup-with-updated-attributes/m-p/1479338#M84735</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/6522"&gt;@JoelBennett&lt;/a&gt;&amp;nbsp;, sorry for the late reply. I managed to reopen the popup with the updated attributes with your solution after commenting the fetchFeatures property from the openPopup method. Thanks.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;reactiveUtils.when(
              () =&amp;gt; editor.viewModel.state === "ready",
              () =&amp;gt; {
                // Remove the editor and open the popup again
                view.ui.remove(editor);
                view.openPopup({
                  fetchFeatures: true,
                  shouldFocus: true
                });
              }
            );&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 28 May 2024 08:25:50 GMT</pubDate>
    <dc:creator>WoHouYeng</dc:creator>
    <dc:date>2024-05-28T08:25:50Z</dc:date>
    <item>
      <title>Reopen popup with updated attributes</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/reopen-popup-with-updated-attributes/m-p/1478193#M84710</link>
      <description>&lt;P data-unlink="true"&gt;I have been following this&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/popup-editaction/" target="_blank" rel="noopener"&gt;sample&lt;/A&gt;&amp;nbsp;to create an popup with edit actions. However when I try to reopen the popup upon successful edits, the popup content is still showing the old value. I used the below code to reopen the popup.&lt;/P&gt;&lt;P&gt;layer.on("edits", e =&amp;gt; {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; view.openPopup({&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; features: e.updatedFeatures&lt;BR /&gt;&amp;nbsp; &amp;nbsp; })&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; editor.viewModel.cancelWorkflow();&lt;BR /&gt;});&lt;/P&gt;</description>
      <pubDate>Fri, 24 May 2024 07:38:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/reopen-popup-with-updated-attributes/m-p/1478193#M84710</guid>
      <dc:creator>WoHouYeng</dc:creator>
      <dc:date>2024-05-24T07:38:50Z</dc:date>
    </item>
    <item>
      <title>Re: Reopen popup with updated attributes</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/reopen-popup-with-updated-attributes/m-p/1478512#M84715</link>
      <description>&lt;P&gt;We have something like the code below in our framework, and it works for this purpose:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;//This is typically used when the popup's selected feature's attributes have changed, and the popup needs to reflect the new values
function reshowPopup(popup, graphic) {
	if (popup.selectedFeature == graphic) {
		var selectedFeatureIndex = popup.selectedFeatureIndex;
		var features = popup.features.concat([]);

		popup.features = features;
		popup.selectedFeatureIndex = selectedFeatureIndex;
	}
}&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 24 May 2024 16:46:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/reopen-popup-with-updated-attributes/m-p/1478512#M84715</guid>
      <dc:creator>JoelBennett</dc:creator>
      <dc:date>2024-05-24T16:46:23Z</dc:date>
    </item>
    <item>
      <title>Re: Reopen popup with updated attributes</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/reopen-popup-with-updated-attributes/m-p/1479338#M84735</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/6522"&gt;@JoelBennett&lt;/a&gt;&amp;nbsp;, sorry for the late reply. I managed to reopen the popup with the updated attributes with your solution after commenting the fetchFeatures property from the openPopup method. Thanks.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;reactiveUtils.when(
              () =&amp;gt; editor.viewModel.state === "ready",
              () =&amp;gt; {
                // Remove the editor and open the popup again
                view.ui.remove(editor);
                view.openPopup({
                  fetchFeatures: true,
                  shouldFocus: true
                });
              }
            );&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 May 2024 08:25:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/reopen-popup-with-updated-attributes/m-p/1479338#M84735</guid>
      <dc:creator>WoHouYeng</dc:creator>
      <dc:date>2024-05-28T08:25:50Z</dc:date>
    </item>
  </channel>
</rss>

