<?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 Clear eSearch Attribute Values in Web AppBuilder Custom Widgets Questions</title>
    <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/clear-esearch-attribute-values/m-p/777489#M2262</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there a way to clear the latest eSearch attribute values?&amp;nbsp; Currently, I go to each control and individually clear it.&amp;nbsp; &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/188709_pastedImage_0.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;P&gt;I could see good reasons for keeping the values selected, but I'd probably rather they be cleared after each search.&amp;nbsp; Or maybe cleared when the "Clear" button is pressed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 04 Mar 2016 15:09:12 GMT</pubDate>
    <dc:creator>TomLeMahieu</dc:creator>
    <dc:date>2016-03-04T15:09:12Z</dc:date>
    <item>
      <title>Clear eSearch Attribute Values</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/clear-esearch-attribute-values/m-p/777489#M2262</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there a way to clear the latest eSearch attribute values?&amp;nbsp; Currently, I go to each control and individually clear it.&amp;nbsp; &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/188709_pastedImage_0.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;P&gt;I could see good reasons for keeping the values selected, but I'd probably rather they be cleared after each search.&amp;nbsp; Or maybe cleared when the "Clear" button is pressed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Mar 2016 15:09:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/clear-esearch-attribute-values/m-p/777489#M2262</guid>
      <dc:creator>TomLeMahieu</dc:creator>
      <dc:date>2016-03-04T15:09:12Z</dc:date>
    </item>
    <item>
      <title>Re: Clear eSearch Attribute Values</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/clear-esearch-attribute-values/m-p/777490#M2263</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tom,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; The only option with out code changes is to change the search layer to another and then back. If you want to make some code changes than you can follow the steps below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Widget.js changes:&lt;/P&gt;&lt;P&gt;Add new function&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; clearFields: function () {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(this.AttributeLayerIndex || this.AttributeLayerIndex === 0){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.onAttributeLayerChange(this.AttributeLayerIndex);
&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;P&gt;&lt;/P&gt;&lt;P&gt;Add this line to _initDrawBox function after all the other this.own(on.... Lines:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;this.own(on(this.btnClear4, "click", lang.hitch(this, this.clearFields, true)));&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Widget.html&lt;/P&gt;&lt;P&gt;Add this new line of code after line 52 in the Widget.html:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;lt;a style="float:right; margin-right:10px" href="#" data-dojo-attach-point="btnClear4"&amp;gt;${nls.clearfields}&amp;lt;/a&amp;gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;nls/strings.js&lt;/P&gt;&lt;P&gt;Add this new line to the nls/strings.js after line 11:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;clearfields: "Clear Fields",&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 08:44:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/clear-esearch-attribute-values/m-p/777490#M2263</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-12T08:44:43Z</dc:date>
    </item>
    <item>
      <title>Re: Clear eSearch Attribute Values</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/clear-esearch-attribute-values/m-p/777491#M2264</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Robert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks so much!! That worked perfectly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Mar 2016 18:33:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/clear-esearch-attribute-values/m-p/777491#M2264</guid>
      <dc:creator>TomLeMahieu</dc:creator>
      <dc:date>2016-03-04T18:33:05Z</dc:date>
    </item>
    <item>
      <title>Re: Clear eSearch Attribute Values</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/clear-esearch-attribute-values/m-p/777492#M2265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Cheers Robert,&lt;/P&gt;&lt;P&gt;This is a very useful function. Hopefully you can add it as an enhancement in coming releases.&lt;/P&gt;&lt;P&gt;Rod&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Mar 2016 08:00:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/clear-esearch-attribute-values/m-p/777492#M2265</guid>
      <dc:creator>RodWoodfordOld</dc:creator>
      <dc:date>2016-03-08T08:00:49Z</dc:date>
    </item>
  </channel>
</rss>

