<?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: How to use a Boolean string from lookup table in search in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-Boolean-string-from-lookup-table-in-search/m-p/338373#M170327</link>
    <description>&lt;P&gt;Can you give sample data?&lt;/P&gt;</description>
    <pubDate>Tue, 17 Apr 2018 04:46:43 GMT</pubDate>
    <dc:creator>p_gurav</dc:creator>
    <dc:date>2018-04-17T04:46:43Z</dc:date>
    <item>
      <title>How to use a Boolean string from lookup table in search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-Boolean-string-from-lookup-table-in-search/m-p/338372#M170326</link>
      <description>&lt;P&gt;I have Boolean string with multiple ORs- code!=x OR code!=y OR etc. When I look it up and use in search it evaluates to string and not Boolean in the eval function. I get error message that a Boolean was expected. Is there a way to force a string to evaluate to Boolean? The string works fine when defined as macro, but I need it in the lookup. Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 17 Apr 2018 00:16:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-Boolean-string-from-lookup-table-in-search/m-p/338372#M170326</guid>
      <dc:creator>skadirov1</dc:creator>
      <dc:date>2018-04-17T00:16:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to use a Boolean string from lookup table in search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-Boolean-string-from-lookup-table-in-search/m-p/338373#M170327</link>
      <description>&lt;P&gt;Can you give sample data?&lt;/P&gt;</description>
      <pubDate>Tue, 17 Apr 2018 04:46:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-Boolean-string-from-lookup-table-in-search/m-p/338373#M170327</guid>
      <dc:creator>p_gurav</dc:creator>
      <dc:date>2018-04-17T04:46:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to use a Boolean string from lookup table in search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-Boolean-string-from-lookup-table-in-search/m-p/338374#M170328</link>
      <description>&lt;P&gt;It would be easier if you give a search as example.&lt;/P&gt;

&lt;P&gt;You might be able to get what you need by using the "return" function.&lt;/P&gt;

&lt;P&gt;In this example, result will be "ok", because the string "foo=\"something\" OR foo=\"whatever\"" will be turned into a boolean expression by return:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults | eval foo="something" | eval result=if([|makeresults | eval string="foo=\"something\" OR foo=\"whatever\""|return $string],"ok","nok")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So your lookup would go into the if clause, finished by a return. &lt;/P&gt;

&lt;P&gt;Hth,&lt;BR /&gt;
Kai.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Apr 2018 11:01:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-Boolean-string-from-lookup-table-in-search/m-p/338374#M170328</guid>
      <dc:creator>knielsen</dc:creator>
      <dc:date>2018-04-17T11:01:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to use a Boolean string from lookup table in search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-Boolean-string-from-lookup-table-in-search/m-p/338375#M170329</link>
      <description>&lt;P&gt;Sure. &lt;BR /&gt;
-code=123&lt;BR /&gt;
-code=456&lt;BR /&gt;
-code=789&lt;/P&gt;

&lt;P&gt;Splunk Error='Typechecking failed. 'OR' only takes boolean arguments.' &lt;/P&gt;

&lt;P&gt;for count(eval(&lt;STRONG&gt;errorsToExclude&lt;/STRONG&gt; OR TIME&amp;gt;1000))&lt;/P&gt;

&lt;P&gt;In the lookup&lt;BR /&gt;
&lt;STRONG&gt;errorsToExclude&lt;/STRONG&gt;=code!=1 OR code!=2 ...&lt;/P&gt;</description>
      <pubDate>Tue, 17 Apr 2018 13:57:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-Boolean-string-from-lookup-table-in-search/m-p/338375#M170329</guid>
      <dc:creator>skadirov1</dc:creator>
      <dc:date>2018-04-17T13:57:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to use a Boolean string from lookup table in search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-Boolean-string-from-lookup-table-in-search/m-p/338376#M170330</link>
      <description>&lt;P&gt;Thanks Kai. What is makeresult? The string with boolean ORs comes from &lt;STRONG&gt;lookup acvsfile errortype OUTPUT errorsToExclude&lt;/STRONG&gt;. How can i pass errorsToExclude into &lt;STRONG&gt;eval(errorsToExclude OR TIME&amp;gt;1000))&lt;/STRONG&gt;?&lt;/P&gt;</description>
      <pubDate>Tue, 17 Apr 2018 15:18:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-Boolean-string-from-lookup-table-in-search/m-p/338376#M170330</guid>
      <dc:creator>skadirov1</dc:creator>
      <dc:date>2018-04-17T15:18:02Z</dc:date>
    </item>
  </channel>
</rss>

