<?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: Custom search text box in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Custom-search-text-box/m-p/76160#M19271</link>
    <description>&lt;P&gt;Thank you martin.&lt;/P&gt;

&lt;P&gt;How can we do validation here?&lt;BR /&gt;
One more thing is this xml a right one to create search text box ? or should i do it using &lt;/P&gt;&lt;FORM&gt;&lt;P&gt;&lt;/P&gt;&lt;/FORM&gt;</description>
    <pubDate>Thu, 27 Jun 2013 04:58:37 GMT</pubDate>
    <dc:creator>prad18</dc:creator>
    <dc:date>2013-06-27T04:58:37Z</dc:date>
    <item>
      <title>Custom search text box</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Custom-search-text-box/m-p/76158#M19269</link>
      <description>&lt;P&gt;Hi, &lt;/P&gt;

&lt;P&gt;I've created custom text box to search the events in splunk.&lt;BR /&gt;
my xml :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt; module name="HiddenSearch" layoutPanel="panel_row3_col1" group="Search field" autoRun="false"&amp;gt;
    &amp;lt; param name="search"&amp;gt;host=myhost Fieldname=  *$target$*  &amp;lt; /param&amp;gt;

&amp;lt; module name="ExtendedFieldSearch"&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="target"&amp;gt;
           &amp;lt; param name="default"&amp;gt;500 &amp;lt; /param&amp;gt;
         &amp;lt; /param&amp;gt;
     &amp;lt; /param&amp;gt;

    &amp;lt; /param&amp;gt;

   &amp;lt; param name="replacementMap"&amp;gt;

     &amp;lt; param name="arg"&amp;gt;
       &amp;lt; param name="target"&amp;gt;
         &amp;lt; param name="value"&amp;gt; &amp;lt; /param&amp;gt;
       &amp;lt; /param&amp;gt;
     &amp;lt; /param&amp;gt;

   &amp;lt; /param&amp;gt;

  &amp;lt; param name="field"&amp;gt;Test&amp;lt; /param&amp;gt;

&amp;lt; module name="ResultsHeader" layoutPanel="panel_row3_col1" group="splIcon-events-list" altTitle="Events List"&amp;gt;
        &amp;lt; param name="entityLabel"&amp;gt;events &amp;lt; /param&amp;gt;
        &amp;lt; param name="entityLabelSingular"&amp;gt;event &amp;lt; /param&amp;gt; 
        &amp;lt; param name="entityName"&amp;gt;events &amp;lt; /param&amp;gt;

     &amp;lt; module name="Export" layoutPanel="panel_row3_col1"&amp;gt;
        &amp;lt; param name="exportType"&amp;gt;event &amp;lt; /param&amp;gt; 
     &amp;lt; /module&amp;gt; 

     &amp;lt; module name="EnablePreview" group="show" layoutPanel="panel_row3_col1"&amp;gt;
        &amp;lt; param name="enable"&amp;gt;True &amp;lt; /param&amp;gt;
     &amp;lt; /module&amp;gt;

     &amp;lt; module name="Paginator" layoutPanel="panel_row3_col1"&amp;gt;
        &amp;lt; param name="entityName"&amp;gt;events &amp;lt; /param&amp;gt;
        &amp;lt; param name="maxPages"&amp;gt;10 &amp;lt; /param&amp;gt;

          &amp;lt; module name="EventsViewer"&amp;gt; 
            &amp;lt; param name="displayRowNumbers"&amp;gt;True &amp;lt; /param&amp;gt;
            &amp;lt; param name="enableBehavior"&amp;gt;True &amp;lt; /param &amp;gt; 
          &amp;lt; /module&amp;gt;
     &amp;lt; /module&amp;gt;

&amp;lt; /module&amp;gt;

  &amp;lt; /module&amp;gt;

&amp;lt; /module&amp;gt; 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In UI, it has created a text box with label Test in which user will enter input text to serach. &lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;&lt;P&gt;Initially my query was just  &lt;STRONG&gt;host=myhost *$target$&lt;/STRONG&gt;* target will have user entered input which will be searched in events and it was working fine and even highlighting the input(which user entered in textbox) in the search result. But when i changed the query from &lt;STRONG&gt;host=myhost *$target$&lt;/STRONG&gt;* to &lt;STRONG&gt;host=myhost fieldname = *$target$&lt;/STRONG&gt;* it worked but stopped highlighting in search results? How to enable highlighting?&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;How to validate whether user entered any input  or just left text box empty? because right now it is searching even if textbox is empty?&lt;/P&gt;&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;I'm new to splunking. Please help me to resolve these and is there any blog or document to understand the xml used in splunk from scratch, I mean each and every &amp;lt; module &amp;gt; used in xml.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2013 12:25:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Custom-search-text-box/m-p/76158#M19269</guid>
      <dc:creator>prad18</dc:creator>
      <dc:date>2013-06-26T12:25:19Z</dc:date>
    </item>
    <item>
      <title>Re: Custom search text box</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Custom-search-text-box/m-p/76159#M19270</link>
      <description>&lt;P&gt;Concerning highlighting, take a look at the highlight command: &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/highlight"&gt;http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/highlight&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2013 12:32:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Custom-search-text-box/m-p/76159#M19270</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2013-06-26T12:32:59Z</dc:date>
    </item>
    <item>
      <title>Re: Custom search text box</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Custom-search-text-box/m-p/76160#M19271</link>
      <description>&lt;P&gt;Thank you martin.&lt;/P&gt;

&lt;P&gt;How can we do validation here?&lt;BR /&gt;
One more thing is this xml a right one to create search text box ? or should i do it using &lt;/P&gt;</description>
      <pubDate>Thu, 27 Jun 2013 04:58:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Custom-search-text-box/m-p/76160#M19271</guid>
      <dc:creator>prad18</dc:creator>
      <dc:date>2013-06-27T04:58:37Z</dc:date>
    </item>
    <item>
      <title>Re: Custom search text box</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Custom-search-text-box/m-p/76161#M19272</link>
      <description>&lt;P&gt;Is it a module? Try defining &lt;MODULE name="test" autorun="false"&gt; in there&lt;/MODULE&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jul 2013 08:00:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Custom-search-text-box/m-p/76161#M19272</guid>
      <dc:creator>linu1988</dc:creator>
      <dc:date>2013-07-05T08:00:20Z</dc:date>
    </item>
  </channel>
</rss>

