<?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 get reference to clicked feature custom widget in Web AppBuilder Custom Widgets Questions</title>
    <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/get-reference-to-clicked-feature-custom-widget/m-p/773212#M1816</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;I am trying to build a custom widget using ArcGIS WebAppBuilder for Developers Edition. My goal is quite simple however I am quite new to the ArcGIS world and am in need of some assistance. The goal is the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a feature set and map that is already built on arcgis online. my organization has wrapped a web app around the map and featuresets to build an application that can be displayed on the website. I need to find a way to add a custom widget to this application to do the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When the user selects a feature (on the map),&amp;nbsp;I need to get a reference to the selected feature's attributes. For example if the feature has an attribute volume and height, i need to get a handle onto those variables so i can work with them in our custom logic.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I.e&amp;nbsp;User clicks on a feature, and opens my widget, the widget gets volume and height values of the selected feature. Then i can run my custom logic to check the volume and height are within our specified parameters. I am having a hard time with getting the reference. Can someone point me in the right direction? I have looked through the tutorials however I dont see this.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 01 Jun 2020 17:10:45 GMT</pubDate>
    <dc:creator>jinjoe</dc:creator>
    <dc:date>2020-06-01T17:10:45Z</dc:date>
    <item>
      <title>get reference to clicked feature custom widget</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/get-reference-to-clicked-feature-custom-widget/m-p/773212#M1816</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;I am trying to build a custom widget using ArcGIS WebAppBuilder for Developers Edition. My goal is quite simple however I am quite new to the ArcGIS world and am in need of some assistance. The goal is the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a feature set and map that is already built on arcgis online. my organization has wrapped a web app around the map and featuresets to build an application that can be displayed on the website. I need to find a way to add a custom widget to this application to do the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When the user selects a feature (on the map),&amp;nbsp;I need to get a reference to the selected feature's attributes. For example if the feature has an attribute volume and height, i need to get a handle onto those variables so i can work with them in our custom logic.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I.e&amp;nbsp;User clicks on a feature, and opens my widget, the widget gets volume and height values of the selected feature. Then i can run my custom logic to check the volume and height are within our specified parameters. I am having a hard time with getting the reference. Can someone point me in the right direction? I have looked through the tutorials however I dont see this.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Jun 2020 17:10:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/get-reference-to-clicked-feature-custom-widget/m-p/773212#M1816</guid>
      <dc:creator>jinjoe</dc:creator>
      <dc:date>2020-06-01T17:10:45Z</dc:date>
    </item>
    <item>
      <title>Re: get reference to clicked feature custom widget</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/get-reference-to-clicked-feature-custom-widget/m-p/773213#M1817</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;The&amp;nbsp;easy way to handle this is through the maps popup. So if the layer has a popup configured then you can get access to the current feature selected in the popup by using&amp;nbsp;&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; feat &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;this&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;getSelectedFeature&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; aVolume &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; feat&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;attributes&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;volume&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; aHeight &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; feat&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;attributes&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;height&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>Sun, 12 Dec 2021 08:39:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/get-reference-to-clicked-feature-custom-widget/m-p/773213#M1817</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-12T08:39:18Z</dc:date>
    </item>
    <item>
      <title>Re: get reference to clicked feature custom widget</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/get-reference-to-clicked-feature-custom-widget/m-p/773214#M1818</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is excellent, this did the trick! i knew it was something easy i was just a noob haha.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jun 2020 20:03:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/get-reference-to-clicked-feature-custom-widget/m-p/773214#M1818</guid>
      <dc:creator>jinjoe</dc:creator>
      <dc:date>2020-06-02T20:03:33Z</dc:date>
    </item>
  </channel>
</rss>

