<?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: Adding a Definition Query to Select Widget in Web AppBuilder Custom Widgets Questions</title>
    <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/adding-a-definition-query-to-select-widget/m-p/837605#M8915</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That worked great. Ended up going with the ID, but it works. Thanks a ton&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&amp;nbsp;this.own(on(this.featureLayer, 'selection-complete', lang.hitch(this, function(){&lt;BR /&gt; var selectedCountSfaPop = null;&lt;BR /&gt; if(this.featureLayer.id === "addressesWithResCOPermits_7269_2284_9950"){&lt;BR /&gt; selectedCountSfaPop = this.featureLayer.getSelectedFeatures().length * 3.02;&lt;BR /&gt; this.selectedCountNodeSfaPop.innerHTML = selectedCountSfaPop.toFixed(2);&lt;BR /&gt; } else if(this.featureLayer.id === "addressesWithResCOPermits_7269_2284_9950_1896"){&lt;BR /&gt; selectedCountSfaPop = this.featureLayer.getSelectedFeatures().length * 3.02;&lt;BR /&gt; this.selectedCountNodeSfaPop.innerHTML = selectedCountSfaPop.toFixed(2);&lt;BR /&gt; }&lt;BR /&gt; else{&lt;BR /&gt; selectedCountSfaPop = this.featureLayer.getSelectedFeatures().length * 2.82;&lt;BR /&gt; this.selectedCountNodeSfaPop.innerHTML = selectedCountSfaPop.toFixed(2);&lt;BR /&gt; if(selectedCountSfaPop === 0) {&lt;BR /&gt; html.addClass(this.domNode, 'no-action');&lt;BR /&gt; } else {&lt;BR /&gt; html.removeClass(this.domNode, 'no-action');&lt;BR /&gt; }&lt;BR /&gt; }})));&lt;/P&gt;&lt;PRE class="line-numbers language-javascript"&gt;&lt;CODE&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 31 Jan 2019 20:23:00 GMT</pubDate>
    <dc:creator>TylerDunn2</dc:creator>
    <dc:date>2019-01-31T20:23:00Z</dc:date>
    <item>
      <title>Adding a Definition Query to Select Widget</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/adding-a-definition-query-to-select-widget/m-p/837595#M8905</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So here's the background:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to use the Select widget to hit 3 layers in my map, but apply a different Census population to each layer.&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/436258_pastedImage_3.png" /&gt;&lt;/P&gt;&lt;P&gt;The layers are Single Family Attached (I want the selection count *3.02), Single Family Detached (I want the selection count * 3.02) and Multi Family (I want the selection count *2.82). This will allow our planners to estimate population in areas of the city. My issue is that I cant figure out a way to define which layer I want to be applying the multiplier to. When I write:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;this.own(on(this.featureLayer, 'selection-complete', lang.hitch(this, function(){&lt;BR /&gt; var selectedCountSfaPop = this.featureLayer.getSelectedFeatures().length * 3.02;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;it applies that to all three layers. When I console.log the layerObject, it returns the 3 layers, but I cannot for the life of me figure out how to separate the layers out for their individual Select and multiply.&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/436257_pastedImage_2.png" /&gt;&lt;/P&gt;&lt;P&gt;I see 2 ways about it:&lt;/P&gt;&lt;P&gt;1) have 1 layer and do 3 definition queries in the script to&amp;nbsp;do the multiply.&lt;/P&gt;&lt;P&gt;2) have 3 layers and within the script specify which layer I'm hitting and do that 3 times.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyone have any suggestions??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Jan 2019 17:03:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/adding-a-definition-query-to-select-widget/m-p/837595#M8905</guid>
      <dc:creator>TylerDunn2</dc:creator>
      <dc:date>2019-01-31T17:03:01Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a Definition Query to Select Widget</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/adding-a-definition-query-to-select-widget/m-p/837596#M8906</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tyler,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Don't the layer has a different ID?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Jan 2019 17:15:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/adding-a-definition-query-to-select-widget/m-p/837596#M8906</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2019-01-31T17:15:46Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a Definition Query to Select Widget</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/adding-a-definition-query-to-select-widget/m-p/837597#M8907</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;They do all have different ID's, but when I try to pinpoint the layer, it seems like it return the ID number, or the layer name, not the actual layer: I also might be doing it in the wrong place. I've tried with layerObject.id, getSelectedFeatures(["1"]) and a few other spots. Where would be the best spot to call the IDs?&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/436302_pastedImage_2.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Jan 2019 17:24:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/adding-a-definition-query-to-select-widget/m-p/837597#M8907</guid>
      <dc:creator>TylerDunn2</dc:creator>
      <dc:date>2019-01-31T17:24:37Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a Definition Query to Select Widget</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/adding-a-definition-query-to-select-widget/m-p/837598#M8908</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tyler,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; OK, I am a little confused. You have:&lt;/P&gt;&lt;PRE class="language-javascript line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;own&lt;/SPAN&gt;&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="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;featureLayer&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'selection-complete'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; lang&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;hitch&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;this&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;&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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Do you not know which layer this.featureLayer references?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Jan 2019 17:37:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/adding-a-definition-query-to-select-widget/m-p/837598#M8908</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2019-01-31T17:37:25Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a Definition Query to Select Widget</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/adding-a-definition-query-to-select-widget/m-p/837599#M8909</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;this.featureLayer is referencing all 3 layers, that's what I'm trying to limit:&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/436303_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;It's really just the same feature service (AddressesWithCOs) added to the map 3 times, and a filter applied to each. So when expanding the console information, they all have different names (same as what's in the config file &lt;IMG class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/436310_pastedImage_2.png" /&gt;)and IDs. I just can't figure out where or how to specify. Would it be easier if they're all in the same feature service and query them out by URL rather then a layer property?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Jan 2019 17:48:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/adding-a-definition-query-to-select-widget/m-p/837599#M8909</guid>
      <dc:creator>TylerDunn2</dc:creator>
      <dc:date>2019-01-31T17:48:27Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a Definition Query to Select Widget</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/adding-a-definition-query-to-select-widget/m-p/837600#M8910</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tyler,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; So can you distinguish them based on the layer.title?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Jan 2019 18:08:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/adding-a-definition-query-to-select-widget/m-p/837600#M8910</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2019-01-31T18:08:59Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a Definition Query to Select Widget</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/adding-a-definition-query-to-select-widget/m-p/837601#M8911</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Would I attach that to this.featureLayer = layerObject at the start? Or would that get attached further down:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/436311_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Jan 2019 18:21:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/adding-a-definition-query-to-select-widget/m-p/837601#M8911</guid>
      <dc:creator>TylerDunn2</dc:creator>
      <dc:date>2019-01-31T18:21:52Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a Definition Query to Select Widget</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/adding-a-definition-query-to-select-widget/m-p/837602#M8912</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tyler,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; No, I was asking you to see if the layer.title (which should already be populated) could help you determine which layer you are dealing with and thus what multiplier to apply.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Jan 2019 18:36:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/adding-a-definition-query-to-select-widget/m-p/837602#M8912</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2019-01-31T18:36:45Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a Definition Query to Select Widget</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/adding-a-definition-query-to-select-widget/m-p/837603#M8913</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yeah it definitely could, all the layers pull in their unique title and the ID. My issue is where to code that into the script&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Jan 2019 18:57:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/adding-a-definition-query-to-select-widget/m-p/837603#M8913</guid>
      <dc:creator>TylerDunn2</dc:creator>
      <dc:date>2019-01-31T18:57:15Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a Definition Query to Select Widget</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/adding-a-definition-query-to-select-widget/m-p/837604#M8914</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The same place you had it initially.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;own&lt;/SPAN&gt;&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="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;featureLayer&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'selection-complete'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; lang&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;hitch&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;this&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;&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; selectedCountSfaPop &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;null&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
  &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;featureLayer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;title &lt;SPAN class="operator token"&gt;===&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"x"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
    selectedCountSfaPop &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;featureLayer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;getSelectedFeatures&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;length &lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;3.02&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;else&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
    selectedCountSfaPop &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;featureLayer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;getSelectedFeatures&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;length &lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2.82&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="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;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 10:11:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/adding-a-definition-query-to-select-widget/m-p/837604#M8914</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-12T10:11:02Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a Definition Query to Select Widget</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/adding-a-definition-query-to-select-widget/m-p/837605#M8915</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That worked great. Ended up going with the ID, but it works. Thanks a ton&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&amp;nbsp;this.own(on(this.featureLayer, 'selection-complete', lang.hitch(this, function(){&lt;BR /&gt; var selectedCountSfaPop = null;&lt;BR /&gt; if(this.featureLayer.id === "addressesWithResCOPermits_7269_2284_9950"){&lt;BR /&gt; selectedCountSfaPop = this.featureLayer.getSelectedFeatures().length * 3.02;&lt;BR /&gt; this.selectedCountNodeSfaPop.innerHTML = selectedCountSfaPop.toFixed(2);&lt;BR /&gt; } else if(this.featureLayer.id === "addressesWithResCOPermits_7269_2284_9950_1896"){&lt;BR /&gt; selectedCountSfaPop = this.featureLayer.getSelectedFeatures().length * 3.02;&lt;BR /&gt; this.selectedCountNodeSfaPop.innerHTML = selectedCountSfaPop.toFixed(2);&lt;BR /&gt; }&lt;BR /&gt; else{&lt;BR /&gt; selectedCountSfaPop = this.featureLayer.getSelectedFeatures().length * 2.82;&lt;BR /&gt; this.selectedCountNodeSfaPop.innerHTML = selectedCountSfaPop.toFixed(2);&lt;BR /&gt; if(selectedCountSfaPop === 0) {&lt;BR /&gt; html.addClass(this.domNode, 'no-action');&lt;BR /&gt; } else {&lt;BR /&gt; html.removeClass(this.domNode, 'no-action');&lt;BR /&gt; }&lt;BR /&gt; }})));&lt;/P&gt;&lt;PRE class="line-numbers language-javascript"&gt;&lt;CODE&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Jan 2019 20:23:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/adding-a-definition-query-to-select-widget/m-p/837605#M8915</guid>
      <dc:creator>TylerDunn2</dc:creator>
      <dc:date>2019-01-31T20:23:00Z</dc:date>
    </item>
  </channel>
</rss>

