<?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 do I populate a multivalue input with itself during a drilldown? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-I-populate-a-multivalue-input-with-itself-during-a/m-p/255913#M16028</link>
    <description>&lt;P&gt;Try something like this (run anywhere example). See how the multiselect values are formatted (just with delimiter) and how they are used in the search (using subsearch to generate field=value1 OR field=value2... format)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;form&amp;gt;
  &amp;lt;label&amp;gt;Multiselect Dropdown&amp;lt;/label&amp;gt;
  &amp;lt;fieldset submitButton="false"&amp;gt;
    &amp;lt;input type="multiselect" token="sourcetype" searchWhenChanged="true"&amp;gt;
      &amp;lt;label&amp;gt;Source Types&amp;lt;/label&amp;gt;
      &amp;lt;choice value="splunkd"&amp;gt;splunkd&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="splunk_web_access"&amp;gt;splunk_web_access&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="scheduler"&amp;gt;scheduler&amp;lt;/choice&amp;gt;
      &amp;lt;default&amp;gt;splunkd,splunk_web_access&amp;lt;/default&amp;gt;
      &amp;lt;delimiter&amp;gt;,&amp;lt;/delimiter&amp;gt;
    &amp;lt;/input&amp;gt;
  &amp;lt;/fieldset&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;chart&amp;gt;
        &amp;lt;title&amp;gt;Sourcetype Distribution&amp;lt;/title&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;index=_internal [| gentimes start=-1 | eval sourcetype="$sourcetype$" | table sourcetype | makemv sourcetype delim="," | mvexpand sourcetype ]| timechart count by sourcetype&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;-60m@m&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="charting.chart"&amp;gt;line&amp;lt;/option&amp;gt;

        &amp;lt;option name="charting.legend.placement"&amp;gt;right&amp;lt;/option&amp;gt;
        &amp;lt;drilldown&amp;gt;
          &amp;lt;link&amp;gt;
            &amp;lt;![CDATA[
               /app/search/multiselect_dropdown?form.sourcetype=$click.name2$
             ]]&amp;gt;
          &amp;lt;/link&amp;gt;
        &amp;lt;/drilldown&amp;gt;        
      &amp;lt;/chart&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>Wed, 27 Jan 2016 20:38:55 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2016-01-27T20:38:55Z</dc:date>
    <item>
      <title>How do I populate a multivalue input with itself during a drilldown?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-I-populate-a-multivalue-input-with-itself-during-a/m-p/255912#M16027</link>
      <description>&lt;P&gt;I have a few inputs at the top of my dashboard, one being a multivalue input. Its default is two values, but I often only have one value in there to filter the result show I'd like.&lt;/P&gt;

&lt;P&gt;I then click on a field value in a random panel that reloads the dashboard page with the new selected data filtering the entire dashboard. However, this resets the multivalue input back to default. This is not what I want. I've tried this and it places values into the multivalue input instead, but incorrectly so, returning no results:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; &amp;lt;link field="filename"&amp;gt;
            &amp;lt;![CDATA[
              /app/Splunk_Files_App/filedata_dashboard?form.filename=$click.value2$&amp;amp;form.index=$index$&amp;amp;form.filetype=$filetype$
            ]]&amp;gt;
 &amp;lt;/link&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;The problem is the multivalue $filetype$. It literally populates it with "file_type=exe" when I drilldown instead of "EXE".&lt;/STRONG&gt;&lt;BR /&gt;
Here is the multivalue input if needed:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;input type="multiselect" token="filetype" searchWhenChanged="true"&amp;gt;
  &amp;lt;label&amp;gt;File name&amp;lt;/label&amp;gt;
  &amp;lt;choice value="*"&amp;gt;All&amp;lt;/choice&amp;gt;
  &amp;lt;default&amp;gt;EXE,PDF&amp;lt;/default&amp;gt;
  &amp;lt;search&amp;gt;
    &amp;lt;query&amp;gt;index=$index$ sourcetype=file_data | dedup file_type | table file_type&amp;lt;/query&amp;gt;
    &amp;lt;earliest&amp;gt;$time.earliest$&amp;lt;/earliest&amp;gt;
    &amp;lt;latest&amp;gt;$time.latest$&amp;lt;/latest&amp;gt;
  &amp;lt;/search&amp;gt;
  &amp;lt;fieldForLabel&amp;gt;file_type&amp;lt;/fieldForLabel&amp;gt;
  &amp;lt;fieldForValue&amp;gt;file_type&amp;lt;/fieldForValue&amp;gt;
  &amp;lt;!--      Build multi-selection search: 
  EX: (sourcetype ="value1" OR sourcetype ="value2" OR ...)
  --&amp;gt;
  &amp;lt;prefix&amp;gt;(&amp;lt;/prefix&amp;gt;
  &amp;lt;valuePrefix&amp;gt;file_type="&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;suffix&amp;gt;)&amp;lt;/suffix&amp;gt;
&amp;lt;/input&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;tldr: I try to populate a multivalue input with itself during a drilldown and it doesn't work as expected. How do I do this?&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jan 2016 20:10:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-I-populate-a-multivalue-input-with-itself-during-a/m-p/255912#M16027</guid>
      <dc:creator>thisissplunk</dc:creator>
      <dc:date>2016-01-27T20:10:32Z</dc:date>
    </item>
    <item>
      <title>Re: How do I populate a multivalue input with itself during a drilldown?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-I-populate-a-multivalue-input-with-itself-during-a/m-p/255913#M16028</link>
      <description>&lt;P&gt;Try something like this (run anywhere example). See how the multiselect values are formatted (just with delimiter) and how they are used in the search (using subsearch to generate field=value1 OR field=value2... format)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;form&amp;gt;
  &amp;lt;label&amp;gt;Multiselect Dropdown&amp;lt;/label&amp;gt;
  &amp;lt;fieldset submitButton="false"&amp;gt;
    &amp;lt;input type="multiselect" token="sourcetype" searchWhenChanged="true"&amp;gt;
      &amp;lt;label&amp;gt;Source Types&amp;lt;/label&amp;gt;
      &amp;lt;choice value="splunkd"&amp;gt;splunkd&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="splunk_web_access"&amp;gt;splunk_web_access&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="scheduler"&amp;gt;scheduler&amp;lt;/choice&amp;gt;
      &amp;lt;default&amp;gt;splunkd,splunk_web_access&amp;lt;/default&amp;gt;
      &amp;lt;delimiter&amp;gt;,&amp;lt;/delimiter&amp;gt;
    &amp;lt;/input&amp;gt;
  &amp;lt;/fieldset&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;chart&amp;gt;
        &amp;lt;title&amp;gt;Sourcetype Distribution&amp;lt;/title&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;index=_internal [| gentimes start=-1 | eval sourcetype="$sourcetype$" | table sourcetype | makemv sourcetype delim="," | mvexpand sourcetype ]| timechart count by sourcetype&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;-60m@m&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="charting.chart"&amp;gt;line&amp;lt;/option&amp;gt;

        &amp;lt;option name="charting.legend.placement"&amp;gt;right&amp;lt;/option&amp;gt;
        &amp;lt;drilldown&amp;gt;
          &amp;lt;link&amp;gt;
            &amp;lt;![CDATA[
               /app/search/multiselect_dropdown?form.sourcetype=$click.name2$
             ]]&amp;gt;
          &amp;lt;/link&amp;gt;
        &amp;lt;/drilldown&amp;gt;        
      &amp;lt;/chart&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>Wed, 27 Jan 2016 20:38:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-I-populate-a-multivalue-input-with-itself-during-a/m-p/255913#M16028</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-01-27T20:38:55Z</dc:date>
    </item>
  </channel>
</rss>

