<?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: Using Variables in SearchBar in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Using-Variables-in-SearchBar/m-p/44893#M179236</link>
    <description>&lt;P&gt;Can you put the HiddenSearch module above the SearchBar, and not specify a default?&lt;/P&gt;</description>
    <pubDate>Wed, 05 Sep 2012 08:31:29 GMT</pubDate>
    <dc:creator>dart</dc:creator>
    <dc:date>2012-09-05T08:31:29Z</dc:date>
    <item>
      <title>Using Variables in SearchBar</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-Variables-in-SearchBar/m-p/44891#M179234</link>
      <description>&lt;P&gt;Hi,
In my view I have a field where I insert a value. I would like to pass this variable into my search using the module "SearchBar". 
I know how to pass values using "HiddenSearch" module but in my case I would like to use the SearchBar so that was possible to hava something like this in the search:  &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="xpto" **A_number=$A-number$** earliest=01/13/2011:10:02:20 latest=01/13/2011:10:03:40 
| timechart count(eval(EVType="OK")) as OK count(eval(EVType="FAILED")) as FAILED  count(eval(EVType="SYSTEMERROR")) as SYSTEMERROR count(eval(EVType="CANCELLED")) as CANCELLED
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and this way if the user doesn't insert the value, the variable assume the default "*" and return me the search for all "A_numberes".  &lt;/P&gt;

&lt;P&gt;Below my "SearchBar" module:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;**module name="SearchBar" autoRun="true" submitButton="true" layoutPanel="splSearchControls-inline"&amp;gt;
    &amp;lt;param name="useOwnSubmitButton"&amp;gt;False&amp;lt;/param&amp;gt;
    &amp;lt;param name="useTypeahead"&amp;gt;true&amp;lt;/param&amp;gt;
    &amp;lt;param name="useAssistant"&amp;gt;true&amp;lt;/param&amp;gt;
    &amp;lt;param name="label"&amp;gt;TIME_DO_SEBEM&amp;lt;/param&amp;gt;
    &amp;lt;param name="default"&amp;gt;index="xpto" **A_number=$A-number$** earliest=01/13/2011:10:02:20 latest=01/13/2011:10:03:40 | timechart count(eval(EVType="OK")) as OK count(eval(EVType="FAILED")) as FAILED  count(eval(EVType="SYSTEMERROR")) as SYSTEMERROR count(eval(EVType="CANCELLED")) as CANCELLED&amp;lt;/param&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Anyway, this search returns me nothing. 
Is that the correct way to add varibales in the serachbar? How can I set the default value "*"?&lt;/P&gt;

&lt;P&gt;Any clue is very welcome....
Thanks in advance.&lt;/P&gt;

&lt;P&gt;-Nuno &lt;/P&gt;</description>
      <pubDate>Tue, 15 Feb 2011 19:40:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-Variables-in-SearchBar/m-p/44891#M179234</guid>
      <dc:creator>gambusino1984</dc:creator>
      <dc:date>2011-02-15T19:40:04Z</dc:date>
    </item>
    <item>
      <title>Re: Using Variables in SearchBar</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-Variables-in-SearchBar/m-p/44892#M179235</link>
      <description>&lt;P&gt;Did you ever solve this issue?&lt;/P&gt;</description>
      <pubDate>Tue, 04 Sep 2012 22:11:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-Variables-in-SearchBar/m-p/44892#M179235</guid>
      <dc:creator>cyndiback</dc:creator>
      <dc:date>2012-09-04T22:11:54Z</dc:date>
    </item>
    <item>
      <title>Re: Using Variables in SearchBar</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-Variables-in-SearchBar/m-p/44893#M179236</link>
      <description>&lt;P&gt;Can you put the HiddenSearch module above the SearchBar, and not specify a default?&lt;/P&gt;</description>
      <pubDate>Wed, 05 Sep 2012 08:31:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-Variables-in-SearchBar/m-p/44893#M179236</guid>
      <dc:creator>dart</dc:creator>
      <dc:date>2012-09-05T08:31:29Z</dc:date>
    </item>
  </channel>
</rss>

