<?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 set up 2 dynamic drop-downs on a Simple XML dashboard where values in one form change based on the other form input? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-set-up-2-dynamic-drop-downs-on-a-Simple-XML-dashboard/m-p/219199#M13614</link>
    <description>&lt;P&gt;So you want to populate dropdown 2 with list of distinct 'Process' if host1 (hardcoded value) is selected and populate with list of distinct 'source if host2 is selected? Are you using the value of dropdown1 (host) anywhere else in the dashboard OR it's only used to determine content of dropdown2?&lt;/P&gt;</description>
    <pubDate>Wed, 04 Jan 2017 22:54:34 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2017-01-04T22:54:34Z</dc:date>
    <item>
      <title>How to set up 2 dynamic drop-downs on a Simple XML dashboard where values in one form change based on the other form input?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-set-up-2-dynamic-drop-downs-on-a-Simple-XML-dashboard/m-p/219198#M13613</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Am very new to Splunk.&lt;BR /&gt;
I have a dashboard with 2 drop-downs. &lt;BR /&gt;
First drop-down contains hostnames like host1, host2&lt;/P&gt;

&lt;P&gt;If I select the host1, then the input for the 2 drop-down must be queary1 and it will display the process names.&lt;BR /&gt;
if I select the host2, then the input for the 2 drop-down must be queary2 and it will display the logs.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Dropdown1     Dropdown2
host1         ----- value1,value2, value3         earliest=-2d host=$host$ Process=AB_* 
host          ----- value4,value5, value6         host=$host$  source=*  
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;What is the simple xml code for this?&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jan 2017 22:12:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-set-up-2-dynamic-drop-downs-on-a-Simple-XML-dashboard/m-p/219198#M13613</guid>
      <dc:creator>svemurilv</dc:creator>
      <dc:date>2017-01-04T22:12:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to set up 2 dynamic drop-downs on a Simple XML dashboard where values in one form change based on the other form input?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-set-up-2-dynamic-drop-downs-on-a-Simple-XML-dashboard/m-p/219199#M13614</link>
      <description>&lt;P&gt;So you want to populate dropdown 2 with list of distinct 'Process' if host1 (hardcoded value) is selected and populate with list of distinct 'source if host2 is selected? Are you using the value of dropdown1 (host) anywhere else in the dashboard OR it's only used to determine content of dropdown2?&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jan 2017 22:54:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-set-up-2-dynamic-drop-downs-on-a-Simple-XML-dashboard/m-p/219199#M13614</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-01-04T22:54:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to set up 2 dynamic drop-downs on a Simple XML dashboard where values in one form change based on the other form input?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-set-up-2-dynamic-drop-downs-on-a-Simple-XML-dashboard/m-p/219200#M13615</link>
      <description>&lt;P&gt;Hi, am using the host(dropdown1) in almost all the dashboard panels, also am using the process and source also in all panels. &lt;/P&gt;</description>
      <pubDate>Thu, 05 Jan 2017 03:18:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-set-up-2-dynamic-drop-downs-on-a-Simple-XML-dashboard/m-p/219200#M13615</guid>
      <dc:creator>svemurilv</dc:creator>
      <dc:date>2017-01-05T03:18:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to set up 2 dynamic drop-downs on a Simple XML dashboard where values in one form change based on the other form input?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-set-up-2-dynamic-drop-downs-on-a-Simple-XML-dashboard/m-p/219201#M13616</link>
      <description>&lt;P&gt;Give this a try. Dropdown1 will have static/hardcoded host name. Once change of selection of dropdown1, it will set another token with query to be executed in dropdown2, based on selected host (double-check the queries). The dropdown2 will the run the query set by dropdown1, in conjunction with selected host and return a valueField column whose values will be shown in dropdown2. You can now use $host$ from dropdown1 and $dropdown2_tok$ from dropdown2 (you can change the name of token per your need).&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;form&amp;gt;
  &amp;lt;label&amp;gt;Use tokens with conditional input choices&amp;lt;/label&amp;gt;
  &amp;lt;fieldset submitButton="false"&amp;gt;
    &amp;lt;input type="dropdown" token="host"&amp;gt;
      &amp;lt;label&amp;gt;Host&amp;lt;/label&amp;gt;
      &amp;lt;choice value="host1"&amp;gt;host1&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="host2"&amp;gt;host2&amp;lt;/choice&amp;gt;
      &amp;lt;default&amp;gt;host1&amp;lt;/default&amp;gt;
      &amp;lt;change&amp;gt;
        &amp;lt;condition label="host1"&amp;gt;
          &amp;lt;set token="dropdown2_query"&amp;gt;earliest=-2d Process=AB_*| stats count by Process | table Process| rename Process as valueField &amp;lt;/set&amp;gt;
        &amp;lt;/condition&amp;gt;
        &amp;lt;condition label="host2"&amp;gt;
          &amp;lt;set token="dropdown2_query"&amp;gt;  source=* | stats count by source | table source | rename source as valueField&amp;lt;/set&amp;gt;
        &amp;lt;/condition&amp;gt;
      &amp;lt;/change&amp;gt;
    &amp;lt;/input&amp;gt;
    &amp;lt;input type="dropdown" token="dropdown2_tok"&amp;gt;
      &amp;lt;label&amp;gt;Some Label Here&amp;lt;/label&amp;gt;
      &amp;lt;selectFirstChoice&amp;gt;true&amp;lt;/selectFirstChoice&amp;gt;
       &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;
            host=$host$ $dropdown2_query$
          &amp;lt;/query&amp;gt;
            &amp;lt;earliest&amp;gt;-7d&amp;lt;/earliest&amp;gt;
            &amp;lt;latest&amp;gt;-0d&amp;lt;/latest&amp;gt;
        &amp;lt;/search&amp;gt;
      &amp;lt;fieldForLabel&amp;gt;valueField&amp;lt;fieldForLabel&amp;gt;
      &amp;lt;fieldForValue&amp;gt;valueField&amp;lt;fieldForValue&amp;gt;
    &amp;lt;/input&amp;gt;
  &amp;lt;/fieldset&amp;gt;
...rest of the dashboard...
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 05 Jan 2017 04:18:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-set-up-2-dynamic-drop-downs-on-a-Simple-XML-dashboard/m-p/219201#M13616</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-01-05T04:18:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to set up 2 dynamic drop-downs on a Simple XML dashboard where values in one form change based on the other form input?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-set-up-2-dynamic-drop-downs-on-a-Simple-XML-dashboard/m-p/219202#M13617</link>
      <description>&lt;P&gt;Thanks! its working good stuff &lt;/P&gt;</description>
      <pubDate>Thu, 05 Jan 2017 15:53:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-set-up-2-dynamic-drop-downs-on-a-Simple-XML-dashboard/m-p/219202#M13617</guid>
      <dc:creator>svemurilv</dc:creator>
      <dc:date>2017-01-05T15:53:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to set up 2 dynamic drop-downs on a Simple XML dashboard where values in one form change based on the other form input?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-set-up-2-dynamic-drop-downs-on-a-Simple-XML-dashboard/m-p/219203#M13618</link>
      <description>&lt;P&gt;Thanks! its working good stuff &lt;/P&gt;</description>
      <pubDate>Thu, 05 Jan 2017 15:54:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-set-up-2-dynamic-drop-downs-on-a-Simple-XML-dashboard/m-p/219203#M13618</guid>
      <dc:creator>svemurilv</dc:creator>
      <dc:date>2017-01-05T15:54:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to set up 2 dynamic drop-downs on a Simple XML dashboard where values in one form change based on the other form input?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-set-up-2-dynamic-drop-downs-on-a-Simple-XML-dashboard/m-p/219204#M13619</link>
      <description>&lt;P&gt;Thanks! working &lt;/P&gt;</description>
      <pubDate>Thu, 05 Jan 2017 15:54:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-set-up-2-dynamic-drop-downs-on-a-Simple-XML-dashboard/m-p/219204#M13619</guid>
      <dc:creator>svemurilv</dc:creator>
      <dc:date>2017-01-05T15:54:25Z</dc:date>
    </item>
  </channel>
</rss>

