<?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: Populating multiselect input conditional on another multiselect input? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Populating-multiselect-input-conditional-on-another-multiselect/m-p/224015#M13900</link>
    <description>&lt;P&gt;Thank you for getting back to me, and I apologize for replying to this thread so late. &lt;/P&gt;

&lt;P&gt;I'll start working on setting that up, but as an alternative, is there any way for this xml to work:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;input type="multiselect" token="testtoka"&amp;gt;
        &amp;lt;label&amp;gt;select index&amp;lt;/label&amp;gt; 
        &amp;lt;default&amp;gt;*amx*&amp;lt;/default&amp;gt;
        &amp;lt;choice value="*amx*"&amp;gt;All&amp;lt;/choice&amp;gt;
        &amp;lt;choice value="amx3_cthamp"&amp;gt;cthamp&amp;lt;/choice&amp;gt;
        &amp;lt;choice value="amx_authamp"&amp;gt;authamp&amp;lt;/choice&amp;gt;
        &amp;lt;choice value="amx_bosmarbal"&amp;gt;bosmarbal&amp;lt;/choice&amp;gt;
        &amp;lt;choice value="amx_cdac"&amp;gt;cdac&amp;lt;/choice&amp;gt;
        &amp;lt;choice value="amx_institution"&amp;gt;institution&amp;lt;/choice&amp;gt;
        &amp;lt;choice value="amx_uam"&amp;gt;uam&amp;lt;/choice&amp;gt;
        &amp;lt;choice value="app_amx"&amp;gt;app_amx&amp;lt;/choice&amp;gt;
        &amp;lt;prefix&amp;gt;(&amp;lt;/prefix&amp;gt;
        &amp;lt;suffix&amp;gt;)&amp;lt;/suffix&amp;gt;
        &amp;lt;valuePrefix&amp;gt;index="&amp;lt;/valuePrefix&amp;gt;
        &amp;lt;valueSuffix&amp;gt;"&amp;lt;/valueSuffix&amp;gt;
        &amp;lt;delimiter&amp;gt; OR &amp;lt;/delimiter&amp;gt;
      &amp;lt;/input&amp;gt;
      &amp;lt;input type="dropdown" token="testtokb"&amp;gt;
        &amp;lt;label&amp;gt;Hosts&amp;lt;/label&amp;gt;
        &amp;lt;prefix&amp;gt;host="&amp;lt;/prefix&amp;gt;
        &amp;lt;suffix&amp;gt;"&amp;lt;/suffix&amp;gt;
        &amp;lt;default&amp;gt;*&amp;lt;/default&amp;gt;
        &amp;lt;!--Define the default value --&amp;gt;
        &amp;lt;choice value="*"&amp;gt;All&amp;lt;/choice&amp;gt;
        &amp;lt;!-- Define the choices with a populating search--&amp;gt;
        &amp;lt;populatingSearch fieldForValue="testtokb" fielForLabel="testtokb"&amp;gt;
          &amp;lt;![CDATA[index="$testtoka$" | stats count by host]]&amp;gt;
        &amp;lt;/populatingSearch&amp;gt;
      &amp;lt;/input&amp;gt;
      &amp;lt;table&amp;gt;
        &amp;lt;title&amp;gt;test&amp;lt;/title&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;host=$testtokb$ source=* "error"| rex "(?&amp;amp;lt;error&amp;amp;gt;)"| rex "\d+\-\d+\-\d+\s+\d+\:\d+\:\d+\,\d+\s+(?&amp;amp;lt;error&amp;amp;gt;.*)"| table _time index host source error&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;$timetok1.earliest$&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;$timetok1.latest$&amp;lt;/latest&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="wrap"&amp;gt;undefined&amp;lt;/option&amp;gt;
        &amp;lt;option name="rowNumbers"&amp;gt;undefined&amp;lt;/option&amp;gt;
        &amp;lt;option name="drilldown"&amp;gt;row&amp;lt;/option&amp;gt;
      &amp;lt;/table&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I tried setting this up so the index in the multi-select will populate the dropdown.  However, when I select an index, the dropdown just says "Search produced no results."&lt;/P&gt;

&lt;P&gt;Any thought?&lt;/P&gt;</description>
    <pubDate>Mon, 27 Jun 2016 20:08:07 GMT</pubDate>
    <dc:creator>vil505</dc:creator>
    <dc:date>2016-06-27T20:08:07Z</dc:date>
    <item>
      <title>Populating multiselect input conditional on another multiselect input?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Populating-multiselect-input-conditional-on-another-multiselect/m-p/224013#M13898</link>
      <description>&lt;P&gt;I'm trying to set up a dashboard that will allow a user to see the stats of the hosts they select.  What I would like to do is make it so the user will select an input, or multiple input, via multiselect, and choice will determine what hosts appear in a second multiselect.  For example, say I select the cthamp index in the first input.  Then in the second input, I should see a choice of prdctlvamx306.clientsys.local, prdctlvamx307.clientsys.local, and so on and so forth.  I have the index multiselect set up, but I don't know how to even begin setting up the host multiselect.  Here is my xml:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;form&amp;gt;
  &amp;lt;label&amp;gt;AMX Version 2&amp;lt;/label&amp;gt;
  &amp;lt;description&amp;gt;Experiment in dashboard search capabilities, designed to give the user more control over what they see in a dashboard.&amp;lt;/description&amp;gt;
  &amp;lt;fieldset submitButton="false"&amp;gt;
    &amp;lt;input type="time" token="timetok1"&amp;gt;
      &amp;lt;label&amp;gt;Select a time range.&amp;lt;/label&amp;gt;
      &amp;lt;default&amp;gt;
        &amp;lt;earliest&amp;gt;-15m@m&amp;lt;/earliest&amp;gt;
        &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
      &amp;lt;/default&amp;gt;
    &amp;lt;/input&amp;gt;
    &amp;lt;input type="multiselect" token="indextok" searchWhenChanged="true"&amp;gt;
      &amp;lt;label&amp;gt;Select one or more indexes.&amp;lt;/label&amp;gt;
      &amp;lt;default&amp;gt;*amx*&amp;lt;/default&amp;gt;
      &amp;lt;choice value="*amx*"&amp;gt;All&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="amx3_cthamp"&amp;gt;cthamp&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="amx_authamp"&amp;gt;authamp&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="amx_bosmarbal"&amp;gt;bosmarbal&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="amx_cdac"&amp;gt;cdac&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="amx_institution"&amp;gt;institution&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="amx_uam"&amp;gt;uam&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="app_amx"&amp;gt;app_amx&amp;lt;/choice&amp;gt;
      &amp;lt;prefix&amp;gt;(&amp;lt;/prefix&amp;gt;
      &amp;lt;suffix&amp;gt;)&amp;lt;/suffix&amp;gt;
      &amp;lt;valuePrefix&amp;gt;index="&amp;lt;/valuePrefix&amp;gt;
      &amp;lt;valueSuffix&amp;gt;"&amp;lt;/valueSuffix&amp;gt;
      &amp;lt;delimiter&amp;gt; OR &amp;lt;/delimiter&amp;gt;
    &amp;lt;/input&amp;gt;
    &amp;lt;input type="multiselect" token="hosttok1"&amp;gt;
      &amp;lt;label&amp;gt;Select target hosts.&amp;lt;/label&amp;gt;
      &amp;lt;change&amp;gt;
        &amp;lt;condition label="cthamp"&amp;gt;
          &amp;lt;set choice="prdctlvamx306.clientsys.local"&amp;gt;prdctlvamx306.clientsys.local&amp;lt;/set&amp;gt;
        &amp;lt;/condition&amp;gt;
      &amp;lt;/change&amp;gt;
    &amp;lt;/input&amp;gt;
  &amp;lt;/fieldset&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;table&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;index=*amx*| stats count by index&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;-15m&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
        &amp;lt;/search&amp;gt;
      &amp;lt;/table&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;table&amp;gt;
        &amp;lt;title&amp;gt;Error Table&amp;lt;/title&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;$indextok$ host=* source=* "error"| rex "(?&amp;amp;lt;error&amp;amp;gt;)"| rex "\d+\-\d+\-\d+\s+\d+\:\d+\:\d+\,\d+\s+(?&amp;amp;lt;error&amp;amp;gt;.*)"| table _time index host source error&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;$timetok1.earliest$&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;$timetok1.latest$&amp;lt;/latest&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="wrap"&amp;gt;true&amp;lt;/option&amp;gt;
        &amp;lt;option name="rowNumbers"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="drilldown"&amp;gt;cell&amp;lt;/option&amp;gt;
        &amp;lt;option name="dataOverlayMode"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="count"&amp;gt;10&amp;lt;/option&amp;gt;
      &amp;lt;/table&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>Tue, 21 Jun 2016 18:14:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Populating-multiselect-input-conditional-on-another-multiselect/m-p/224013#M13898</guid>
      <dc:creator>vil505</dc:creator>
      <dc:date>2016-06-21T18:14:03Z</dc:date>
    </item>
    <item>
      <title>Re: Populating multiselect input conditional on another multiselect input?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Populating-multiselect-input-conditional-on-another-multiselect/m-p/224014#M13899</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;P&gt;1) Create a lookup table with your index name and corresponding host name. Say lookup name is index_to_host.csv with fields index and host&lt;BR /&gt;
2) For host multiselect, instead of static options use, search like this. Use host ad field for value and label.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | inputlookup index_to_host.csv | table index host | search index=$indextok$ | table host
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 29 Sep 2020 09:59:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Populating-multiselect-input-conditional-on-another-multiselect/m-p/224014#M13899</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2020-09-29T09:59:09Z</dc:date>
    </item>
    <item>
      <title>Re: Populating multiselect input conditional on another multiselect input?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Populating-multiselect-input-conditional-on-another-multiselect/m-p/224015#M13900</link>
      <description>&lt;P&gt;Thank you for getting back to me, and I apologize for replying to this thread so late. &lt;/P&gt;

&lt;P&gt;I'll start working on setting that up, but as an alternative, is there any way for this xml to work:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;input type="multiselect" token="testtoka"&amp;gt;
        &amp;lt;label&amp;gt;select index&amp;lt;/label&amp;gt; 
        &amp;lt;default&amp;gt;*amx*&amp;lt;/default&amp;gt;
        &amp;lt;choice value="*amx*"&amp;gt;All&amp;lt;/choice&amp;gt;
        &amp;lt;choice value="amx3_cthamp"&amp;gt;cthamp&amp;lt;/choice&amp;gt;
        &amp;lt;choice value="amx_authamp"&amp;gt;authamp&amp;lt;/choice&amp;gt;
        &amp;lt;choice value="amx_bosmarbal"&amp;gt;bosmarbal&amp;lt;/choice&amp;gt;
        &amp;lt;choice value="amx_cdac"&amp;gt;cdac&amp;lt;/choice&amp;gt;
        &amp;lt;choice value="amx_institution"&amp;gt;institution&amp;lt;/choice&amp;gt;
        &amp;lt;choice value="amx_uam"&amp;gt;uam&amp;lt;/choice&amp;gt;
        &amp;lt;choice value="app_amx"&amp;gt;app_amx&amp;lt;/choice&amp;gt;
        &amp;lt;prefix&amp;gt;(&amp;lt;/prefix&amp;gt;
        &amp;lt;suffix&amp;gt;)&amp;lt;/suffix&amp;gt;
        &amp;lt;valuePrefix&amp;gt;index="&amp;lt;/valuePrefix&amp;gt;
        &amp;lt;valueSuffix&amp;gt;"&amp;lt;/valueSuffix&amp;gt;
        &amp;lt;delimiter&amp;gt; OR &amp;lt;/delimiter&amp;gt;
      &amp;lt;/input&amp;gt;
      &amp;lt;input type="dropdown" token="testtokb"&amp;gt;
        &amp;lt;label&amp;gt;Hosts&amp;lt;/label&amp;gt;
        &amp;lt;prefix&amp;gt;host="&amp;lt;/prefix&amp;gt;
        &amp;lt;suffix&amp;gt;"&amp;lt;/suffix&amp;gt;
        &amp;lt;default&amp;gt;*&amp;lt;/default&amp;gt;
        &amp;lt;!--Define the default value --&amp;gt;
        &amp;lt;choice value="*"&amp;gt;All&amp;lt;/choice&amp;gt;
        &amp;lt;!-- Define the choices with a populating search--&amp;gt;
        &amp;lt;populatingSearch fieldForValue="testtokb" fielForLabel="testtokb"&amp;gt;
          &amp;lt;![CDATA[index="$testtoka$" | stats count by host]]&amp;gt;
        &amp;lt;/populatingSearch&amp;gt;
      &amp;lt;/input&amp;gt;
      &amp;lt;table&amp;gt;
        &amp;lt;title&amp;gt;test&amp;lt;/title&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;host=$testtokb$ source=* "error"| rex "(?&amp;amp;lt;error&amp;amp;gt;)"| rex "\d+\-\d+\-\d+\s+\d+\:\d+\:\d+\,\d+\s+(?&amp;amp;lt;error&amp;amp;gt;.*)"| table _time index host source error&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;$timetok1.earliest$&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;$timetok1.latest$&amp;lt;/latest&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="wrap"&amp;gt;undefined&amp;lt;/option&amp;gt;
        &amp;lt;option name="rowNumbers"&amp;gt;undefined&amp;lt;/option&amp;gt;
        &amp;lt;option name="drilldown"&amp;gt;row&amp;lt;/option&amp;gt;
      &amp;lt;/table&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I tried setting this up so the index in the multi-select will populate the dropdown.  However, when I select an index, the dropdown just says "Search produced no results."&lt;/P&gt;

&lt;P&gt;Any thought?&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jun 2016 20:08:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Populating-multiselect-input-conditional-on-another-multiselect/m-p/224015#M13900</guid>
      <dc:creator>vil505</dc:creator>
      <dc:date>2016-06-27T20:08:07Z</dc:date>
    </item>
  </channel>
</rss>

