<?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: SearchTemplate Query Error in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/SearchTemplate-Query-Error/m-p/54973#M179767</link>
    <description>&lt;P&gt;Thanks for the update!&lt;/P&gt;</description>
    <pubDate>Mon, 14 Mar 2011 01:24:40 GMT</pubDate>
    <dc:creator>Paolo_Prigione</dc:creator>
    <dc:date>2011-03-14T01:24:40Z</dc:date>
    <item>
      <title>SearchTemplate Query Error</title>
      <link>https://community.splunk.com/t5/Splunk-Search/SearchTemplate-Query-Error/m-p/54970#M179764</link>
      <description>&lt;P&gt;I am facing the problem when i am adding "\" inside the searchTemplate query for conditional checks.The same query is working fine when used for the search but not inside searchTemplate .&lt;/P&gt;

&lt;P&gt;Query inside SearchTemplate:&lt;/P&gt;

&lt;P&gt;searchTemplate&amp;gt; 
tag="$tagname$" sourcetype="SrcFile" | eval series1=if(searchmatch("\"first String \" AND \"Second String\""),_time,null()) | timechart span="$splitinterval$"   count(series1) as Request&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;   &amp;lt;/searchTemplate&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;H2&gt;ERROR ::&lt;/H2&gt;

&lt;P&gt;PARSER: Applying intentions failed Error in 'eval' command: The expression is malformed. Expected ).&lt;/P&gt;

&lt;P&gt;Please provide any help if possible.I had tried the option for CData inside the tag.&lt;/P&gt;

&lt;P&gt;Thanks in Advance!&lt;/P&gt;</description>
      <pubDate>Mon, 07 Mar 2011 19:30:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/SearchTemplate-Query-Error/m-p/54970#M179764</guid>
      <dc:creator>rkanalyst</dc:creator>
      <dc:date>2011-03-07T19:30:28Z</dc:date>
    </item>
    <item>
      <title>Re: SearchTemplate Query Error</title>
      <link>https://community.splunk.com/t5/Splunk-Search/SearchTemplate-Query-Error/m-p/54971#M179765</link>
      <description>&lt;P&gt;Have you tried to use ascii-html for troublesome characters? Try the following: &lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;replace " (quote) with &amp;amp;quot;&lt;/LI&gt;
&lt;LI&gt;replace \ (backslash) with &amp;amp;#92;&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Mon, 07 Mar 2011 19:55:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/SearchTemplate-Query-Error/m-p/54971#M179765</guid>
      <dc:creator>Paolo_Prigione</dc:creator>
      <dc:date>2011-03-07T19:55:04Z</dc:date>
    </item>
    <item>
      <title>Re: SearchTemplate Query Error</title>
      <link>https://community.splunk.com/t5/Splunk-Search/SearchTemplate-Query-Error/m-p/54972#M179766</link>
      <description>&lt;P&gt;Thanks.&lt;BR /&gt;
But I tried by changing the " and \ with the string you mentioned.But Still I am facing the same problem.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Mar 2011 20:19:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/SearchTemplate-Query-Error/m-p/54972#M179766</guid>
      <dc:creator>rkanalyst</dc:creator>
      <dc:date>2011-03-07T20:19:43Z</dc:date>
    </item>
    <item>
      <title>Re: SearchTemplate Query Error</title>
      <link>https://community.splunk.com/t5/Splunk-Search/SearchTemplate-Query-Error/m-p/54973#M179767</link>
      <description>&lt;P&gt;Thanks for the update!&lt;/P&gt;</description>
      <pubDate>Mon, 14 Mar 2011 01:24:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/SearchTemplate-Query-Error/m-p/54973#M179767</guid>
      <dc:creator>Paolo_Prigione</dc:creator>
      <dc:date>2011-03-14T01:24:40Z</dc:date>
    </item>
    <item>
      <title>Re: SearchTemplate Query Error</title>
      <link>https://community.splunk.com/t5/Splunk-Search/SearchTemplate-Query-Error/m-p/54974#M179768</link>
      <description>&lt;P&gt;Got this error Resolved by using the macro. Putting this content in : sourcetype="SrcFile" | eval series1=if(searchmatch(""first String " AND "Second String""),_time,null()) a newly defined Macro.&lt;/P&gt;

&lt;P&gt;I found other informations like 1)Backslah problem in splunk &lt;A href="http://answers.splunk.com/questions/6563/backslash-escape-problem"&gt;http://answers.splunk.com/questions/6563/backslash-escape-problem&lt;/A&gt; 2) Use search macro&lt;/P&gt;

&lt;P&gt;&lt;A href="http://www.splunk.com/base/Documentation/latest/User/CreateAndUseSearchMacros"&gt;http://www.splunk.com/base/Documentation/latest/User/CreateAndUseSearchMacros&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Aug 2011 14:10:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/SearchTemplate-Query-Error/m-p/54974#M179768</guid>
      <dc:creator>rkanalyst</dc:creator>
      <dc:date>2011-08-08T14:10:08Z</dc:date>
    </item>
  </channel>
</rss>

