<?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 to accept multiple value inputs in a Splunk Form? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-accept-multiple-value-inputs-in-a-Splunk-Form/m-p/18513#M177211</link>
    <description>&lt;P&gt;&lt;IMG src="http://splunk-base.splunk.com//storage/Screen_shot_2013-02-04_at_10.22.38_AM.jpg" alt="alt text" /&gt;&lt;/P&gt;

&lt;P&gt;So I'm setting up a form/dashboard so that team members can lookup file information.  Right now the form can only accept 1 value and thus only return results on the one file.  However I'd like like to enable people to enter a comma separated list of values. &lt;/P&gt;

&lt;P&gt;e.g. user enters the following fileids into the splunk form, and returns info on all files.&lt;BR /&gt;
1004043,38945894,8954829,438989233&lt;/P&gt;

&lt;P&gt;thoughts?&lt;/P&gt;</description>
    <pubDate>Mon, 04 Feb 2013 15:24:44 GMT</pubDate>
    <dc:creator>marquiselee</dc:creator>
    <dc:date>2013-02-04T15:24:44Z</dc:date>
    <item>
      <title>How to accept multiple value inputs in a Splunk Form?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-accept-multiple-value-inputs-in-a-Splunk-Form/m-p/18513#M177211</link>
      <description>&lt;P&gt;&lt;IMG src="http://splunk-base.splunk.com//storage/Screen_shot_2013-02-04_at_10.22.38_AM.jpg" alt="alt text" /&gt;&lt;/P&gt;

&lt;P&gt;So I'm setting up a form/dashboard so that team members can lookup file information.  Right now the form can only accept 1 value and thus only return results on the one file.  However I'd like like to enable people to enter a comma separated list of values. &lt;/P&gt;

&lt;P&gt;e.g. user enters the following fileids into the splunk form, and returns info on all files.&lt;BR /&gt;
1004043,38945894,8954829,438989233&lt;/P&gt;

&lt;P&gt;thoughts?&lt;/P&gt;</description>
      <pubDate>Mon, 04 Feb 2013 15:24:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-accept-multiple-value-inputs-in-a-Splunk-Form/m-p/18513#M177211</guid>
      <dc:creator>marquiselee</dc:creator>
      <dc:date>2013-02-04T15:24:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to accept multiple value inputs in a Splunk Form?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-accept-multiple-value-inputs-in-a-Splunk-Form/m-p/18514#M177212</link>
      <description>&lt;P&gt;In advanced XML I've done this in the past :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;module name="ExtendedFieldSearch"&amp;gt;
    &amp;lt;param name="field"&amp;gt;Comma seperated list&amp;lt;/param&amp;gt;
    &amp;lt;param name="intention"&amp;gt;
        &amp;lt;param name="name"&amp;gt;stringreplace&amp;lt;/param&amp;gt;
        &amp;lt;param name="arg"&amp;gt;
            &amp;lt;param name="multi_search"&amp;gt;
            &amp;lt;param name="fillOnEmpty"&amp;gt;false&amp;lt;/param&amp;gt;
            &amp;lt;param name="prefix"&amp;gt;
                &amp;lt;![CDATA[[search * | head 1 | eval CL4="]]&amp;gt;
            &amp;lt;/param&amp;gt;
            &amp;lt;param name="suffix"&amp;gt;
                &amp;lt;![CDATA[" | makemv delim="," CL4 | mvexpand CL4 | fields CL4] ]]&amp;gt;
            &amp;lt;/param&amp;gt;
        &amp;lt;/param&amp;gt;
    &amp;lt;/param&amp;gt;
&amp;lt;/param&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So what you're essentially doing is :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[search * | head 1 | eval CL4="your,comma,seperated,list"| makemv delim="," CL4 | mvexpand CL4 | fields CL4]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;which will insert :&lt;BR /&gt;
    ((CL4=your) OR (CL4=comma) OR (CL4=seperated) OR (CL4=list))&lt;/P&gt;

&lt;P&gt;anywhere you specify &lt;CODE&gt;$multi_search$&lt;/CODE&gt; in your main search&lt;/P&gt;</description>
      <pubDate>Mon, 04 Feb 2013 18:28:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-accept-multiple-value-inputs-in-a-Splunk-Form/m-p/18514#M177212</guid>
      <dc:creator>jonuwz</dc:creator>
      <dc:date>2013-02-04T18:28:12Z</dc:date>
    </item>
  </channel>
</rss>

