<?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 do I hide a dropdown based on a checkbox value in a Splunk dashboard? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-I-hide-a-dropdown-based-on-a-checkbox-value-in-a-Splunk/m-p/382359#M25040</link>
    <description>&lt;P&gt;I have 2 dropdowns in a panel and I want to show them based on the value of a checkbox defined in the same dashboard. Can someone please let me know the changes required in XML for the same?&lt;/P&gt;

&lt;P&gt;Checkbox : &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;ValueA
ValueB
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If we choose valueA - Dropdown1 should be displayed &lt;BR /&gt;
if we choose valueB - Dropdown2 should be displayed&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Mon, 12 Nov 2018 10:28:02 GMT</pubDate>
    <dc:creator>AnmolKohli</dc:creator>
    <dc:date>2018-11-12T10:28:02Z</dc:date>
    <item>
      <title>How do I hide a dropdown based on a checkbox value in a Splunk dashboard?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-I-hide-a-dropdown-based-on-a-checkbox-value-in-a-Splunk/m-p/382359#M25040</link>
      <description>&lt;P&gt;I have 2 dropdowns in a panel and I want to show them based on the value of a checkbox defined in the same dashboard. Can someone please let me know the changes required in XML for the same?&lt;/P&gt;

&lt;P&gt;Checkbox : &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;ValueA
ValueB
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If we choose valueA - Dropdown1 should be displayed &lt;BR /&gt;
if we choose valueB - Dropdown2 should be displayed&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 12 Nov 2018 10:28:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-I-hide-a-dropdown-based-on-a-checkbox-value-in-a-Splunk/m-p/382359#M25040</guid>
      <dc:creator>AnmolKohli</dc:creator>
      <dc:date>2018-11-12T10:28:02Z</dc:date>
    </item>
    <item>
      <title>Re: How do I hide a dropdown based on a checkbox value in a Splunk dashboard?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-I-hide-a-dropdown-based-on-a-checkbox-value-in-a-Splunk/m-p/382360#M25041</link>
      <description>&lt;P&gt;Hi @AnmolKohli,&lt;BR /&gt;
Try below :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;fieldset submitButton="false"&amp;gt;
      &amp;lt;input type="checkbox" token="view"&amp;gt;
        &amp;lt;label&amp;gt;View&amp;lt;/label&amp;gt;
          &amp;lt;choice value="ValueA"&amp;gt;ValueA&amp;lt;/choice&amp;gt;
        &amp;lt;choice value="ValueB"&amp;gt;ValueB&amp;lt;/choice&amp;gt;
        &amp;lt;default&amp;gt;site&amp;lt;/default&amp;gt;
        &amp;lt;change&amp;gt;
          &amp;lt;condition value="ValueA"&amp;gt;
              &amp;lt;set token="A"&amp;gt;true&amp;lt;/set&amp;gt;
              &amp;lt;unset token="B"&amp;gt;&amp;lt;/unset&amp;gt;
            &amp;lt;/condition&amp;gt;
            &amp;lt;condition value="ValueB"&amp;gt;
              &amp;lt;set token="B"&amp;gt;true&amp;lt;/set&amp;gt;
              &amp;lt;unset token="A"&amp;gt;&amp;lt;/unset&amp;gt;
            &amp;lt;/condition&amp;gt;
        &amp;lt;/change&amp;gt;
      &amp;lt;/input&amp;gt;
      &amp;lt;input type="dropdown" token="test" depends="$A$" &amp;gt;
        &amp;lt;label&amp;gt;dropdown 1&amp;lt;/label&amp;gt;
        &amp;lt;choice value="data1"&amp;gt;Data1&amp;lt;/choice&amp;gt;
        &amp;lt;choice value="data2"&amp;gt;Data2&amp;lt;/choice&amp;gt;
      &amp;lt;/input&amp;gt;
      &amp;lt;input type="dropdown" token="test2" depends="$B$" &amp;gt;
        &amp;lt;label&amp;gt;dropdown 2&amp;lt;/label&amp;gt;
        &amp;lt;choice value="data3"&amp;gt;Data3&amp;lt;/choice&amp;gt;
        &amp;lt;choice value="data4"&amp;gt;Data4&amp;lt;/choice&amp;gt;
      &amp;lt;/input&amp;gt;
    &amp;lt;/fieldset&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Here as per checkbox value it will set and unset token and dropdown will be depends on these token to hide or show ...this is not yet tested but you will get an idea&lt;/P&gt;</description>
      <pubDate>Mon, 12 Nov 2018 12:03:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-I-hide-a-dropdown-based-on-a-checkbox-value-in-a-Splunk/m-p/382360#M25041</guid>
      <dc:creator>493669</dc:creator>
      <dc:date>2018-11-12T12:03:44Z</dc:date>
    </item>
    <item>
      <title>Re: How do I hide a dropdown based on a checkbox value in a Splunk dashboard?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-I-hide-a-dropdown-based-on-a-checkbox-value-in-a-Splunk/m-p/382361#M25042</link>
      <description>&lt;P&gt;@AnmolKohli , if you need to select only on check box and accordingly only display one Dropdown the solution by @493669 should work. However, if this is actually your use case ideally you should be using Radio button instead of check box which will allow you to select only one option at a time. &lt;/P&gt;

&lt;P&gt;With checkbox users will have option to choose both values A and B, which is when the above solution will not work. You would need to use independent search to set/unset the the required tokens based on multiple selections. Refer to following answer on Similar lines: &lt;A href="https://answers.splunk.com/answers/681330/can-i-hideunhide-specific-text-boxes-using-a-singl.html"&gt;https://answers.splunk.com/answers/681330/can-i-hideunhide-specific-text-boxes-using-a-singl.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Nov 2018 12:34:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-I-hide-a-dropdown-based-on-a-checkbox-value-in-a-Splunk/m-p/382361#M25042</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2018-11-12T12:34:54Z</dc:date>
    </item>
    <item>
      <title>Re: How do I hide a dropdown based on a checkbox value in a Splunk dashboard?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-I-hide-a-dropdown-based-on-a-checkbox-value-in-a-Splunk/m-p/382362#M25043</link>
      <description>&lt;P&gt;Worked &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 13 Nov 2018 11:34:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-I-hide-a-dropdown-based-on-a-checkbox-value-in-a-Splunk/m-p/382362#M25043</guid>
      <dc:creator>AnmolKohli</dc:creator>
      <dc:date>2018-11-13T11:34:31Z</dc:date>
    </item>
    <item>
      <title>Re: How do I hide a dropdown based on a checkbox value in a Splunk dashboard?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-I-hide-a-dropdown-based-on-a-checkbox-value-in-a-Splunk/m-p/382363#M25044</link>
      <description>&lt;P&gt;@AnmolKohli If your problem is resolved, please accept an answer to help future readers.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Nov 2018 11:56:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-I-hide-a-dropdown-based-on-a-checkbox-value-in-a-Splunk/m-p/382363#M25044</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2018-11-13T11:56:50Z</dc:date>
    </item>
  </channel>
</rss>

