<?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 How can I get the currently selected features from Search Widget to a new widget? in ArcGIS Web AppBuilder Questions</title>
    <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/how-can-i-get-the-currently-selected-features-from/m-p/38708#M1045</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to use the features returned from a search in a new widget. How can my new widget access the currently selected features (FYI - features selected using the 'Enhanced Search' widget.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any and all help would be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 24 May 2015 02:03:19 GMT</pubDate>
    <dc:creator>MikeWottrich</dc:creator>
    <dc:date>2015-05-24T02:03:19Z</dc:date>
    <item>
      <title>How can I get the currently selected features from Search Widget to a new widget?</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/how-can-i-get-the-currently-selected-features-from/m-p/38708#M1045</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to use the features returned from a search in a new widget. How can my new widget access the currently selected features (FYI - features selected using the 'Enhanced Search' widget.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any and all help would be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 24 May 2015 02:03:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/how-can-i-get-the-currently-selected-features-from/m-p/38708#M1045</guid>
      <dc:creator>MikeWottrich</dc:creator>
      <dc:date>2015-05-24T02:03:19Z</dc:date>
    </item>
    <item>
      <title>Re: How can I get the currently selected features from Search Widget to a new widget?</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/how-can-i-get-the-currently-selected-features-from/m-p/38709#M1046</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Mike,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; If you choose "Add Result as Operational Layer" then you can use some code like this in your other widget:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var slyr;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; array.some(this.map.graphicsLayerIds, lang.hitch(this, function (layerId) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var lyr = this.map.getLayer(layerId);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(lyr.name === "Search result: Parcels"){ /*change "Parcels to the name of your layer */
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; slyr = lyr;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return true;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }));
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(slyr){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; array.map(slyr.graphics, lang.hitch(this, function(gra, index){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //do something with the selected graphics
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }));
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 21:30:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/how-can-i-get-the-currently-selected-features-from/m-p/38709#M1046</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-10T21:30:16Z</dc:date>
    </item>
    <item>
      <title>Re: How can I get the currently selected features from Search Widget to a new widget?</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/how-can-i-get-the-currently-selected-features-from/m-p/38710#M1047</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Robert.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This was very helpful. I will test this out later today.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2015 14:59:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/how-can-i-get-the-currently-selected-features-from/m-p/38710#M1047</guid>
      <dc:creator>MikeWottrich</dc:creator>
      <dc:date>2015-05-26T14:59:18Z</dc:date>
    </item>
  </channel>
</rss>

