<?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: how to clear dropdown box? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/how-to-clear-dropdown-box/m-p/190905#M11909</link>
    <description>&lt;P&gt;Hi&lt;BR /&gt;
No chance to do this with simple XML and without HTML and JavaScript?&lt;BR /&gt;
Regards&lt;BR /&gt;
Matthias&lt;/P&gt;</description>
    <pubDate>Wed, 16 May 2018 14:36:56 GMT</pubDate>
    <dc:creator>cssmdi</dc:creator>
    <dc:date>2018-05-16T14:36:56Z</dc:date>
    <item>
      <title>how to clear dropdown box?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/how-to-clear-dropdown-box/m-p/190903#M11907</link>
      <description>&lt;P&gt;hi,&lt;/P&gt;

&lt;P&gt;how to clear dropdown box? . i have 2 dropdown box related i need to reset or clear the second one on the change   off the first one.&lt;/P&gt;

&lt;P&gt;regrads,&lt;BR /&gt;
Elias&lt;/P&gt;</description>
      <pubDate>Tue, 19 May 2015 13:31:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/how-to-clear-dropdown-box/m-p/190903#M11907</guid>
      <dc:creator>eliasabouhamad</dc:creator>
      <dc:date>2015-05-19T13:31:08Z</dc:date>
    </item>
    <item>
      <title>Re: how to clear dropdown box?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/how-to-clear-dropdown-box/m-p/190904#M11908</link>
      <description>&lt;P&gt;I solved a similar problem using this javascript:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;require([
    'splunkjs/ready!',
    'splunkjs/mvc/textinputview',
    'splunkjs/mvc/dropdownview'
  ],
  function(mvc) {
    var input1 = mvc.Components.get('input1');
    var input2 = mvc.Components.get('input2');
    input1.on('change', function() {
      input2.val(undefined);
    });
});
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 05 Aug 2015 10:26:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/how-to-clear-dropdown-box/m-p/190904#M11908</guid>
      <dc:creator>torrentg</dc:creator>
      <dc:date>2015-08-05T10:26:59Z</dc:date>
    </item>
    <item>
      <title>Re: how to clear dropdown box?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/how-to-clear-dropdown-box/m-p/190905#M11909</link>
      <description>&lt;P&gt;Hi&lt;BR /&gt;
No chance to do this with simple XML and without HTML and JavaScript?&lt;BR /&gt;
Regards&lt;BR /&gt;
Matthias&lt;/P&gt;</description>
      <pubDate>Wed, 16 May 2018 14:36:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/how-to-clear-dropdown-box/m-p/190905#M11909</guid>
      <dc:creator>cssmdi</dc:creator>
      <dc:date>2018-05-16T14:36:56Z</dc:date>
    </item>
    <item>
      <title>Re: how to clear dropdown box?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/how-to-clear-dropdown-box/m-p/190906#M11910</link>
      <description>&lt;P&gt;@cssmdi, @eliasabouhamad&lt;/P&gt;

&lt;P&gt;On change of value of the main dropdown, set both the depended dropdown token and its corresponding form token as well. Following is a run anywhere example:&lt;BR /&gt;
The &lt;CODE&gt;&amp;lt;change&amp;gt;&lt;/CODE&gt; event handler for Dropdown 1 updates both the token and form token for Dropdown2&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;      &amp;lt;change&amp;gt;
        &amp;lt;set token="form.tokDropdown2"&amp;gt;$value$&amp;lt;/set&amp;gt;
        &amp;lt;set token="tokDropdown2"&amp;gt;$value$&amp;lt;/set&amp;gt;
      &amp;lt;/change&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Please try out and confirm!&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;form&amp;gt;
  &amp;lt;label&amp;gt;Clear Dropdown 2 Selection On Change of Dropdown 1&amp;lt;/label&amp;gt;
  &amp;lt;fieldset submitButton="false"&amp;gt;
    &amp;lt;input type="dropdown" token="tokDropdown1" searchWhenChanged="true"&amp;gt;
      &amp;lt;label&amp;gt;Dropdown 1&amp;lt;/label&amp;gt;
      &amp;lt;choice value="a"&amp;gt;Alpha&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="b"&amp;gt;Beta&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="c"&amp;gt;Charlie&amp;lt;/choice&amp;gt;
      &amp;lt;change&amp;gt;
        &amp;lt;set token="form.tokDropdown2"&amp;gt;$value$&amp;lt;/set&amp;gt;
        &amp;lt;set token="tokDropdown2"&amp;gt;$value$&amp;lt;/set&amp;gt;
      &amp;lt;/change&amp;gt;
      &amp;lt;default&amp;gt;a&amp;lt;/default&amp;gt;
    &amp;lt;/input&amp;gt;
    &amp;lt;input type="dropdown" token="tokDropdown2" searchWhenChanged="true"&amp;gt;
      &amp;lt;label&amp;gt;Dropdown 2&amp;lt;/label&amp;gt;
      &amp;lt;choice value="a"&amp;gt;Apple&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="b"&amp;gt;Banana&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="c"&amp;gt;Cucumber&amp;lt;/choice&amp;gt;
      &amp;lt;default&amp;gt;a&amp;lt;/default&amp;gt;
    &amp;lt;/input&amp;gt;
  &amp;lt;/fieldset&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;html&amp;gt;
        &amp;lt;div&amp;gt;Dropdown 1: $tokDropdown1$&amp;lt;/div&amp;gt;
        &amp;lt;div&amp;gt;Dropdown 2: $tokDropdown2$&amp;lt;/div&amp;gt;
      &amp;lt;/html&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/form&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 17 May 2018 08:54:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/how-to-clear-dropdown-box/m-p/190906#M11910</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2018-05-17T08:54:09Z</dc:date>
    </item>
    <item>
      <title>Re: how to clear dropdown box?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/how-to-clear-dropdown-box/m-p/190907#M11911</link>
      <description>&lt;P&gt;Hi niketnilay&lt;/P&gt;

&lt;P&gt;Works like a charm. Thank you very much!!&lt;BR /&gt;
I missed the &amp;lt;set token="form.tokDropdown2"&amp;gt;value_to_set&amp;lt;/set&amp;gt;&lt;BR /&gt;
 It is hard to find this form.tokenname in the documentation.&lt;/P&gt;

&lt;P&gt;Kind regards&lt;BR /&gt;
Matthias&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 19:34:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/how-to-clear-dropdown-box/m-p/190907#M11911</guid>
      <dc:creator>cssmdi</dc:creator>
      <dc:date>2020-09-29T19:34:15Z</dc:date>
    </item>
    <item>
      <title>Re: how to clear dropdown box?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/how-to-clear-dropdown-box/m-p/190908#M11912</link>
      <description>&lt;P&gt;@cssmdi I know that you have not posted the Question so you can not accept the answer. But do up vote the answer/comments that helped &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Do try and get the &lt;A href="https://splunkbase.splunk.com/app/1603/"&gt;Splunk Dashboard Examples App&lt;/A&gt; which has several everyday use case examples including those for Drilldown, Cascaded Dropdown and Tokens etc.&lt;/P&gt;</description>
      <pubDate>Thu, 17 May 2018 11:14:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/how-to-clear-dropdown-box/m-p/190908#M11912</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2018-05-17T11:14:26Z</dc:date>
    </item>
  </channel>
</rss>

