<?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 popup - how to fetch the query result after the popup appears on view click event in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-how-to-fetch-the-query-result-after-the/m-p/22113#M1917</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;OL&gt;&lt;LI&gt;I have a webmap attached to a view.&lt;/LI&gt;&lt;LI&gt;Now when ever a view is clicked, a default popup appears over the map.&lt;/LI&gt;&lt;LI&gt;After the popup has been added, a query is called automatically to load the features&lt;/LI&gt;&lt;LI&gt;I need to get the result of this query.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;IMG __jive_id="312995" alt="" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/312995_popup.png" style="width: 620px; height: 319px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I get the result, so that I can use the result data. I cannot see any event related to the query nor the popup object to get the result. &amp;nbsp;I am using js ver 4.2 btw.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 01 Feb 2017 11:32:02 GMT</pubDate>
    <dc:creator>LaxmanThapa</dc:creator>
    <dc:date>2017-02-01T11:32:02Z</dc:date>
    <item>
      <title>popup - how to fetch the query result after the popup appears on view click event</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-how-to-fetch-the-query-result-after-the/m-p/22113#M1917</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;OL&gt;&lt;LI&gt;I have a webmap attached to a view.&lt;/LI&gt;&lt;LI&gt;Now when ever a view is clicked, a default popup appears over the map.&lt;/LI&gt;&lt;LI&gt;After the popup has been added, a query is called automatically to load the features&lt;/LI&gt;&lt;LI&gt;I need to get the result of this query.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;IMG __jive_id="312995" alt="" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/312995_popup.png" style="width: 620px; height: 319px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I get the result, so that I can use the result data. I cannot see any event related to the query nor the popup object to get the result. &amp;nbsp;I am using js ver 4.2 btw.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Feb 2017 11:32:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-how-to-fetch-the-query-result-after-the/m-p/22113#M1917</guid>
      <dc:creator>LaxmanThapa</dc:creator>
      <dc:date>2017-02-01T11:32:02Z</dc:date>
    </item>
    <item>
      <title>Re: popup - how to fetch the query result after the popup appears on view click event</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-how-to-fetch-the-query-result-after-the/m-p/22114#M1918</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You should be able to get the query feature with view.popup.features and then iterate through the features returned to get the attributes.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Feb 2017 12:28:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-how-to-fetch-the-query-result-after-the/m-p/22114#M1918</guid>
      <dc:creator>FC_Basson</dc:creator>
      <dc:date>2017-02-01T12:28:24Z</dc:date>
    </item>
    <item>
      <title>Re: popup - how to fetch the query result after the popup appears on view click event</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-how-to-fetch-the-query-result-after-the/m-p/22115#M1919</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;But how to trigger the callback function? How do I know when the query request has completed ?&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Feb 2017 13:12:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-how-to-fetch-the-query-result-after-the/m-p/22115#M1919</guid>
      <dc:creator>LaxmanThapa</dc:creator>
      <dc:date>2017-02-01T13:12:07Z</dc:date>
    </item>
    <item>
      <title>Re: popup - how to fetch the query result after the popup appears on view click event</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-how-to-fetch-the-query-result-after-the/m-p/22116#M1920</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Event handler?&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;view&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;popup&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;on&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"open"&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;evt&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;// code&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 20:54:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-how-to-fetch-the-query-result-after-the/m-p/22116#M1920</guid>
      <dc:creator>FC_Basson</dc:creator>
      <dc:date>2021-12-10T20:54:02Z</dc:date>
    </item>
    <item>
      <title>Re: popup - how to fetch the query result after the popup appears on view click event</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-how-to-fetch-the-query-result-after-the/m-p/22117#M1921</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Basson, thanks for the quick reply but your code didnot help.&lt;/P&gt;&lt;P&gt;The event 'open' doesnot fire..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Feb 2017 13:49:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-how-to-fetch-the-query-result-after-the/m-p/22117#M1921</guid>
      <dc:creator>LaxmanThapa</dc:creator>
      <dc:date>2017-02-01T13:49:18Z</dc:date>
    </item>
    <item>
      <title>Re: popup - how to fetch the query result after the popup appears on view click event</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-how-to-fetch-the-query-result-after-the/m-p/22118#M1922</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, no time to test.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Feb 2017 13:52:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-how-to-fetch-the-query-result-after-the/m-p/22118#M1922</guid>
      <dc:creator>FC_Basson</dc:creator>
      <dc:date>2017-02-01T13:52:24Z</dc:date>
    </item>
    <item>
      <title>Re: popup - how to fetch the query result after the popup appears on view click event</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-how-to-fetch-the-query-result-after-the/m-p/22119#M1923</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Also, there is no event 'open' for the view.popup @ api reference&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#events-summary" title="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#events-summary"&gt;Popup | API Reference | ArcGIS API for JavaScript 4.2&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Feb 2017 13:52:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-how-to-fetch-the-query-result-after-the/m-p/22119#M1923</guid>
      <dc:creator>LaxmanThapa</dc:creator>
      <dc:date>2017-02-01T13:52:25Z</dc:date>
    </item>
    <item>
      <title>Re: popup - how to fetch the query result after the popup appears on view click event</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-how-to-fetch-the-query-result-after-the/m-p/22120#M1924</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried to add a popup template &amp;nbsp;for the layer like&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;var &lt;/SPAN&gt;&lt;SPAN style="color: #458383;"&gt;popupTemplate &lt;/SPAN&gt;= &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;PopupTemplate({
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;title&lt;/SPAN&gt;: &lt;SPAN style="color: #008000; font-weight: bold;"&gt;"Régions Industrielles 2017: {NOM}"&lt;/SPAN&gt;,
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #7a7a43;"&gt;content&lt;/SPAN&gt;: &lt;SPAN&gt;setContentInfo
&lt;/SPAN&gt;});

&lt;SPAN style="color: #000080; font-weight: bold;"&gt;function &lt;/SPAN&gt;&lt;SPAN&gt;setContentInfo&lt;/SPAN&gt;(feature){
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;console&lt;/SPAN&gt;.&lt;SPAN style="color: #7a7a43;"&gt;log&lt;/SPAN&gt;(feature)
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;return &lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-weight: bold;"&gt;"?? no idea what the original template is...."&lt;/SPAN&gt;;
}

//later added this template to the layer
&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #808080;"&gt;lyr.popupTemplate = popupTemplate;

Now I can access the query feature, but now I do not know the 'content' template for the popup.&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 20:54:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-how-to-fetch-the-query-result-after-the/m-p/22120#M1924</guid>
      <dc:creator>LaxmanThapa</dc:creator>
      <dc:date>2021-12-10T20:54:04Z</dc:date>
    </item>
    <item>
      <title>Re: popup - how to fetch the query result after the popup appears on view click event</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-how-to-fetch-the-query-result-after-the/m-p/22121#M1925</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello there, here comes an example :&lt;/P&gt;&lt;P&gt;&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; myTitle &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Hello"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; sum1&amp;nbsp; &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"there"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; point &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;attributes&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;geometry&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; content &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="template-string token"&gt;&lt;SPAN class="string token"&gt;`&amp;lt;div style=padding-top: 10px;&amp;gt;Title: &lt;/SPAN&gt;&lt;SPAN class="interpolation token"&gt;&lt;SPAN class="interpolation-punctuation punctuation token"&gt;${&lt;/SPAN&gt;myTitle&lt;SPAN class="interpolation-punctuation punctuation token"&gt;}&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;&amp;lt;br /&amp;gt;&amp;lt;/div&amp;gt;
 &amp;lt;div style=padding-top: 10px;&amp;gt;Sum1: &lt;/SPAN&gt;&lt;SPAN class="interpolation token"&gt;&lt;SPAN class="interpolation-punctuation punctuation token"&gt;${&lt;/SPAN&gt;sum1&lt;SPAN class="interpolation-punctuation punctuation token"&gt;}&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;&amp;lt;br /&amp;gt;&amp;lt;/div&amp;gt;`&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
map&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;infoWindow&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;resize&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;450&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;250&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
 map&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;infoWindow&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;setContent&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;esri&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;substitute&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;esri&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;geometry&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;webMercatorToGeographic&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;point&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; content&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;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 20:54:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-how-to-fetch-the-query-result-after-the/m-p/22121#M1925</guid>
      <dc:creator>EvelynHernandez</dc:creator>
      <dc:date>2021-12-10T20:54:07Z</dc:date>
    </item>
  </channel>
</rss>

