<?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: Form with a multi-line text box that will OR every line it is given. in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Form-with-a-multi-line-text-box-that-will-OR-every-line-it-is/m-p/21801#M3297</link>
    <description>&lt;P&gt;Have you considered using a multi-line Pulldown from sideview utils? That would also save your users from knowing available values.&lt;/P&gt;</description>
    <pubDate>Wed, 06 Feb 2013 14:52:56 GMT</pubDate>
    <dc:creator>martin_mueller</dc:creator>
    <dc:date>2013-02-06T14:52:56Z</dc:date>
    <item>
      <title>Form with a multi-line text box that will OR every line it is given.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Form-with-a-multi-line-text-box-that-will-OR-every-line-it-is/m-p/21800#M3296</link>
      <description>&lt;P&gt;I want to have a text box where a user can paste a list of items and then have each line be treated as an OR argument.&lt;/P&gt;

&lt;P&gt;For Example: &lt;BR /&gt;
User puts the following in a text box(Token=status):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;400
403
404
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The form has the following search in it: &lt;CODE&gt;search index=httplogs status=$status$&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Then hit search and the following search executes: &lt;CODE&gt;search index=httplogs status=400 OR status=403 OR status=404&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Is this possible?&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 06 Feb 2013 14:13:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Form-with-a-multi-line-text-box-that-will-OR-every-line-it-is/m-p/21800#M3296</guid>
      <dc:creator>agodoy</dc:creator>
      <dc:date>2013-02-06T14:13:22Z</dc:date>
    </item>
    <item>
      <title>Re: Form with a multi-line text box that will OR every line it is given.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Form-with-a-multi-line-text-box-that-will-OR-every-line-it-is/m-p/21801#M3297</link>
      <description>&lt;P&gt;Have you considered using a multi-line Pulldown from sideview utils? That would also save your users from knowing available values.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Feb 2013 14:52:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Form-with-a-multi-line-text-box-that-will-OR-every-line-it-is/m-p/21801#M3297</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2013-02-06T14:52:56Z</dc:date>
    </item>
    <item>
      <title>Re: Form with a multi-line text box that will OR every line it is given.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Form-with-a-multi-line-text-box-that-will-OR-every-line-it-is/m-p/21802#M3298</link>
      <description>&lt;P&gt;No because today they might search for 400,403,404, but tomorrow for 1223,456,901. We do not know what they will be looking for, but we know what field to look in.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Feb 2013 14:57:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Form-with-a-multi-line-text-box-that-will-OR-every-line-it-is/m-p/21802#M3298</guid>
      <dc:creator>agodoy</dc:creator>
      <dc:date>2013-02-06T14:57:50Z</dc:date>
    </item>
    <item>
      <title>Re: Form with a multi-line text box that will OR every line it is given.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Form-with-a-multi-line-text-box-that-will-OR-every-line-it-is/m-p/21803#M3299</link>
      <description>&lt;P&gt;As far as I know there's no such multi-line textbox available. You could solve this in other ways, but if your requirement is that the textbox needs to be multiline you're out of luck.&lt;/P&gt;

&lt;P&gt;UPDATE: I've been digging through my previous splunkbase answers because I'm pretty sure I wrote up a solution on this, but I'm unable to find it. Anyway the idea was that given a textbox with comma delimited values, this would be expanded to an OR separated list. So, let's say the user-provided input (the comma-delimited list of terms) is available in the variable &lt;CODE&gt;$status$&lt;/CODE&gt;. Enter this into a query using a subsearch, expand the list into a multivalued field using &lt;CODE&gt;makemv&lt;/CODE&gt; and voilà, this should expand into what you want.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;youroutersearch [search * | head 1 | eval status="$status$" | makemv delim="," status | fields status]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;(the search + head commands at the beginning of the subsearch is just to get one event so that &lt;CODE&gt;eval&lt;/CODE&gt; can do its thing. You could use other commands like &lt;CODE&gt;gentimes&lt;/CODE&gt; if you don't want to perform a search operation for this)&lt;/P&gt;

&lt;P&gt;So, what happens is the user inputs for example "400,403,404" in the input field. This is put into the variable &lt;CODE&gt;status&lt;/CODE&gt; by &lt;CODE&gt;eval&lt;/CODE&gt;, then expanded into a multivalued field holding by &lt;CODE&gt;makemv&lt;/CODE&gt;, then finally the subsearch returns, performing an OR operation between the terms so that the subsearch is expanded to&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;youroutersearch ((( status="400" OR status="403" OR status="404" )))
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 06 Feb 2013 15:08:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Form-with-a-multi-line-text-box-that-will-OR-every-line-it-is/m-p/21803#M3299</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2013-02-06T15:08:39Z</dc:date>
    </item>
    <item>
      <title>Re: Form with a multi-line text box that will OR every line it is given.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Form-with-a-multi-line-text-box-that-will-OR-every-line-it-is/m-p/21804#M3300</link>
      <description>&lt;P&gt;You could populate the Pulldown dynamically with every value the field can take, based on the events loaded into splunk. Anything else typed by the users would not yield results anyway.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Feb 2013 15:10:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Form-with-a-multi-line-text-box-that-will-OR-every-line-it-is/m-p/21804#M3300</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2013-02-06T15:10:30Z</dc:date>
    </item>
    <item>
      <title>Re: Form with a multi-line text box that will OR every line it is given.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Form-with-a-multi-line-text-box-that-will-OR-every-line-it-is/m-p/21805#M3301</link>
      <description>&lt;P&gt;Is there a way to do it without having a multi-line form. I just want the user to paste and search, but sometimes they might search for more then one value depending on what they copied.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Feb 2013 15:13:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Form-with-a-multi-line-text-box-that-will-OR-every-line-it-is/m-p/21805#M3301</guid>
      <dc:creator>agodoy</dc:creator>
      <dc:date>2013-02-06T15:13:32Z</dc:date>
    </item>
    <item>
      <title>Re: Form with a multi-line text box that will OR every line it is given.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Form-with-a-multi-line-text-box-that-will-OR-every-line-it-is/m-p/21806#M3302</link>
      <description>&lt;P&gt;Too many values to do this.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Feb 2013 15:17:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Form-with-a-multi-line-text-box-that-will-OR-every-line-it-is/m-p/21806#M3302</guid>
      <dc:creator>agodoy</dc:creator>
      <dc:date>2013-02-06T15:17:06Z</dc:date>
    </item>
    <item>
      <title>Re: Form with a multi-line text box that will OR every line it is given.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Form-with-a-multi-line-text-box-that-will-OR-every-line-it-is/m-p/21807#M3303</link>
      <description>&lt;P&gt;Unfortunately, the form search modules in "vanilla" Splunk do not provide an option to assemble the terms provided by the user into a "TERM1 OR TERM2 OR TERM3" expression.&lt;/P&gt;

&lt;P&gt;You would have to write your own module to perform this task.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Feb 2013 06:45:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Form-with-a-multi-line-text-box-that-will-OR-every-line-it-is/m-p/21807#M3303</guid>
      <dc:creator>hexx</dc:creator>
      <dc:date>2013-02-13T06:45:01Z</dc:date>
    </item>
    <item>
      <title>Re: Form with a multi-line text box that will OR every line it is given.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Form-with-a-multi-line-text-box-that-will-OR-every-line-it-is/m-p/21808#M3304</link>
      <description>&lt;P&gt;This is actually possible with the latest version of Sideview Utils. &lt;/P&gt;

&lt;P&gt;The latest is 2.4.  You can download it from the Sideview website, and it is free for internal use.  &lt;A href="http://sideviewapps.com/apps/sideview-utils/"&gt;http://sideviewapps.com/apps/sideview-utils/&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;here's what the config would look like for your use case. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;module name="TextField" layoutPanel="panel_row3_col1" autoRun="True"&amp;gt;
  &amp;lt;param name="name"&amp;gt;multilineStatuses&amp;lt;/param&amp;gt;
  &amp;lt;param name="label"&amp;gt;enter status values one on each line&amp;lt;/param&amp;gt;
  &amp;lt;param name="rows"&amp;gt;4&amp;lt;/param&amp;gt;

  &amp;lt;module name="Button"&amp;gt;

    &amp;lt;module name="ValueSetter"&amp;gt;
      &amp;lt;param name="name"&amp;gt;arrayValue&amp;lt;/param&amp;gt;
      &amp;lt;param name="delim"&amp;gt;\n&amp;lt;/param&amp;gt;
      &amp;lt;param name="value"&amp;gt;$multilineStatuses$&amp;lt;/param&amp;gt;

      &amp;lt;module name="ArrayValueSetter"&amp;gt;
        &amp;lt;param name="name"&amp;gt;searchExpression&amp;lt;/param&amp;gt;
        &amp;lt;param name="array"&amp;gt;$arrayValue$&amp;lt;/param&amp;gt;
        &amp;lt;param name="template"&amp;gt;status="$value$"&amp;lt;/param&amp;gt;
        &amp;lt;param name="separator"&amp;gt;+OR+&amp;lt;/param&amp;gt;
        &amp;lt;param name="outerTemplate"&amp;gt;( $value$ )&amp;lt;/param&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Basically it's a multiline text input box,  the user types in status codes, one on each line, and the end result is a token called $searchExpression$,  that will be &lt;CODE&gt;( status="500" OR status="401" OR status="404" )&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Note that there is also a page of documentation about the ArrayValueSetter module on which you'll see an example quite similar to this one.   Once you've updated the app and restarted Splunk, navigate in the Sideview Utils docs to "Module Documentation &amp;gt; Advanced Modules &amp;gt; The ArrayValueSetter module"&lt;/P&gt;</description>
      <pubDate>Wed, 13 Feb 2013 07:45:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Form-with-a-multi-line-text-box-that-will-OR-every-line-it-is/m-p/21808#M3304</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2013-02-13T07:45:40Z</dc:date>
    </item>
    <item>
      <title>Re: Form with a multi-line text box that will OR every line it is given.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Form-with-a-multi-line-text-box-that-will-OR-every-line-it-is/m-p/21809#M3305</link>
      <description>&lt;P&gt;Updated my answer. Let me know if this works &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Feb 2013 09:00:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Form-with-a-multi-line-text-box-that-will-OR-every-line-it-is/m-p/21809#M3305</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2013-02-13T09:00:44Z</dc:date>
    </item>
    <item>
      <title>Re: Form with a multi-line text box that will OR every line it is given.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Form-with-a-multi-line-text-box-that-will-OR-every-line-it-is/m-p/21810#M3306</link>
      <description>&lt;P&gt;Awesome! I changed the delim to a blank space instead of a comma so the user does not have to worry about pasting a comma-delimited list.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Feb 2013 15:06:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Form-with-a-multi-line-text-box-that-will-OR-every-line-it-is/m-p/21810#M3306</guid>
      <dc:creator>agodoy</dc:creator>
      <dc:date>2013-02-13T15:06:43Z</dc:date>
    </item>
    <item>
      <title>Re: Form with a multi-line text box that will OR every line it is given.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Form-with-a-multi-line-text-box-that-will-OR-every-line-it-is/m-p/21811#M3307</link>
      <description>&lt;P&gt;Good to know. Once I dig in to your App I might consider doing this. Thanks for your reply.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Feb 2013 15:08:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Form-with-a-multi-line-text-box-that-will-OR-every-line-it-is/m-p/21811#M3307</guid>
      <dc:creator>agodoy</dc:creator>
      <dc:date>2013-02-13T15:08:52Z</dc:date>
    </item>
  </channel>
</rss>

