<?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: Populate second drop down based on first drop down selection ? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Populate-second-drop-down-based-on-first-drop-down-selection/m-p/255907#M43249</link>
    <description>&lt;P&gt;I agree with the other answer but to answer your literal question, try code like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;input type="text" token="server_partial" searchWhenChanged="false"&amp;gt;
    &amp;lt;label&amp;gt;RegEx filter for Server Dropdown --&amp;amp;gt;&amp;lt;/label&amp;gt;
    &amp;lt;default&amp;gt;.&amp;lt;/default&amp;gt;
&amp;lt;/input&amp;gt;
&amp;lt;input type="dropdown" token="server" searchWhenChanged="false"&amp;gt;
    &amp;lt;label&amp;gt;(&amp;amp;lt;-- filtered) Server Selector:&amp;lt;/label&amp;gt;
    &amp;lt;default&amp;gt;*&amp;lt;/default&amp;gt;
    &amp;lt;choice value="*"&amp;gt;All&amp;lt;/choice&amp;gt;
    &amp;lt;fieldForLabel&amp;gt;server&amp;lt;/fieldForLabel&amp;gt;
    &amp;lt;fieldForValue&amp;gt;server&amp;lt;/fieldForValue&amp;gt;
    &amp;lt;search&amp;gt;
        &amp;lt;query&amp;gt;| inputcsv serverlist.csv | regex server="(?i)$server_partial$" | table server&amp;lt;/query&amp;gt;
        &amp;lt;earliest&amp;gt;-1s&amp;lt;/earliest&amp;gt;
        &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
    &amp;lt;/search&amp;gt;
&amp;lt;/input&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 27 Jan 2017 14:06:00 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2017-01-27T14:06:00Z</dc:date>
    <item>
      <title>Populate second drop down based on first drop down selection ?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Populate-second-drop-down-based-on-first-drop-down-selection/m-p/255902#M43244</link>
      <description>&lt;P&gt;Hi Experts,&lt;/P&gt;

&lt;P&gt;I have one static drop down , it has 2 static value "stage and Prod". Now I want to display values in the second drop down based on first drop down selection . So second drop down shows staging servers only if first selection was stage and vice versa. &lt;/P&gt;

&lt;P&gt;to be more specific &lt;BR /&gt;
If Drop down 1 = stage&lt;BR /&gt;
Drop down 2 = abc_stage1,abc_stage2 (using a query )&lt;/P&gt;

&lt;P&gt;IF Drop down 2 = prod &lt;BR /&gt;
Drop down 2 = abc_prod1,abc_prod2 (using a query )&lt;/P&gt;

&lt;P&gt;Please help&lt;/P&gt;

&lt;P&gt;VG&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 12:33:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Populate-second-drop-down-based-on-first-drop-down-selection/m-p/255902#M43244</guid>
      <dc:creator>vikas_gopal</dc:creator>
      <dc:date>2020-09-29T12:33:42Z</dc:date>
    </item>
    <item>
      <title>Re: Populate second drop down based on first drop down selection ?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Populate-second-drop-down-based-on-first-drop-down-selection/m-p/255903#M43245</link>
      <description>&lt;P&gt;How do you know that a server is staging or prod?&lt;BR /&gt;
Typically there is a naming convention...&lt;/P&gt;

&lt;P&gt;Let's assume production servers have the letter P as the third character:&lt;/P&gt;

&lt;P&gt;aaPxxx &amp;lt;-prod&lt;BR /&gt;
aaSxxx &amp;lt;- staging&lt;/P&gt;

&lt;P&gt;Now your first drop down has value P for Production and value S for staging and env is the name of the token.&lt;/P&gt;

&lt;P&gt;In your second drop down you would populate it with this search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=AIndexWithAllHosts | dedup host | rex field=host "..($&amp;lt;env&amp;gt;.)" | search env=$env$ | fields host | sort host
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And you use host as the field for the values.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2017 12:30:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Populate-second-drop-down-based-on-first-drop-down-selection/m-p/255903#M43245</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2017-01-27T12:30:19Z</dc:date>
    </item>
    <item>
      <title>Re: Populate second drop down based on first drop down selection ?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Populate-second-drop-down-based-on-first-drop-down-selection/m-p/255904#M43246</link>
      <description>&lt;P&gt;I can see all staging servers have stage string in it and all prod has prod string in the server name .&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2017 12:36:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Populate-second-drop-down-based-on-first-drop-down-selection/m-p/255904#M43246</guid>
      <dc:creator>vikas_gopal</dc:creator>
      <dc:date>2017-01-27T12:36:08Z</dc:date>
    </item>
    <item>
      <title>Re: Populate second drop down based on first drop down selection ?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Populate-second-drop-down-based-on-first-drop-down-selection/m-p/255905#M43247</link>
      <description>&lt;P&gt;A lot of people prefer to use | metadata type=hosts instead of index=AIndexWithAllHosts&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2017 12:41:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Populate-second-drop-down-based-on-first-drop-down-selection/m-p/255905#M43247</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2017-01-27T12:41:37Z</dc:date>
    </item>
    <item>
      <title>Re: Populate second drop down based on first drop down selection ?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Populate-second-drop-down-based-on-first-drop-down-selection/m-p/255906#M43248</link>
      <description>&lt;P&gt;Thank you Man, &lt;/P&gt;

&lt;P&gt;Works like charm.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2017 12:58:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Populate-second-drop-down-based-on-first-drop-down-selection/m-p/255906#M43248</guid>
      <dc:creator>vikas_gopal</dc:creator>
      <dc:date>2017-01-27T12:58:20Z</dc:date>
    </item>
    <item>
      <title>Re: Populate second drop down based on first drop down selection ?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Populate-second-drop-down-based-on-first-drop-down-selection/m-p/255907#M43249</link>
      <description>&lt;P&gt;I agree with the other answer but to answer your literal question, try code like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;input type="text" token="server_partial" searchWhenChanged="false"&amp;gt;
    &amp;lt;label&amp;gt;RegEx filter for Server Dropdown --&amp;amp;gt;&amp;lt;/label&amp;gt;
    &amp;lt;default&amp;gt;.&amp;lt;/default&amp;gt;
&amp;lt;/input&amp;gt;
&amp;lt;input type="dropdown" token="server" searchWhenChanged="false"&amp;gt;
    &amp;lt;label&amp;gt;(&amp;amp;lt;-- filtered) Server Selector:&amp;lt;/label&amp;gt;
    &amp;lt;default&amp;gt;*&amp;lt;/default&amp;gt;
    &amp;lt;choice value="*"&amp;gt;All&amp;lt;/choice&amp;gt;
    &amp;lt;fieldForLabel&amp;gt;server&amp;lt;/fieldForLabel&amp;gt;
    &amp;lt;fieldForValue&amp;gt;server&amp;lt;/fieldForValue&amp;gt;
    &amp;lt;search&amp;gt;
        &amp;lt;query&amp;gt;| inputcsv serverlist.csv | regex server="(?i)$server_partial$" | table server&amp;lt;/query&amp;gt;
        &amp;lt;earliest&amp;gt;-1s&amp;lt;/earliest&amp;gt;
        &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
    &amp;lt;/search&amp;gt;
&amp;lt;/input&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 27 Jan 2017 14:06:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Populate-second-drop-down-based-on-first-drop-down-selection/m-p/255907#M43249</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-01-27T14:06:00Z</dc:date>
    </item>
    <item>
      <title>Re: Populate second drop down based on first drop down selection ?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Populate-second-drop-down-based-on-first-drop-down-selection/m-p/255908#M43250</link>
      <description>&lt;P&gt;Got another situation , now I am preparing a table based on above 2 inputs . When it is stage + All in second I want to see only stage servers in the table below . What it is doing in table is, it is giving me overall servers details that is for both stage and prod . For table I tried this but with this no data appears&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=abc  source=computer host=$host$ $env$| sort Name  |table Name,Domain, Manufacturer, Model|dedup Name,Domain, Manufacturer, Mode
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I know this is because of $env$ as it is searching for P or S. &lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2017 14:10:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Populate-second-drop-down-based-on-first-drop-down-selection/m-p/255908#M43250</guid>
      <dc:creator>vikas_gopal</dc:creator>
      <dc:date>2017-01-27T14:10:20Z</dc:date>
    </item>
    <item>
      <title>Re: Populate second drop down based on first drop down selection ?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Populate-second-drop-down-based-on-first-drop-down-selection/m-p/678055#M55532</link>
      <description>&lt;P&gt;Can you share the soluition?&lt;/P&gt;</description>
      <pubDate>Tue, 20 Feb 2024 10:49:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Populate-second-drop-down-based-on-first-drop-down-selection/m-p/678055#M55532</guid>
      <dc:creator>DDivagarInfant</dc:creator>
      <dc:date>2024-02-20T10:49:34Z</dc:date>
    </item>
  </channel>
</rss>

