<?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 'OR' boolean in an eval expression? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-OR-boolean-in-an-eval-expression/m-p/368652#M108655</link>
    <description>&lt;P&gt;Something in the spirit of - &lt;CODE&gt;| eval your_value=if(message="Event Description" OR name="Event Description", "xxxx"," all others")&lt;/CODE&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 14 Aug 2017 13:41:19 GMT</pubDate>
    <dc:creator>ddrillic</dc:creator>
    <dc:date>2017-08-14T13:41:19Z</dc:date>
    <item>
      <title>How to use 'OR' boolean in an eval expression?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-OR-boolean-in-an-eval-expression/m-p/368651#M108654</link>
      <description>&lt;P&gt;We're combining many types of searches into one tabled alert. We create our own variables with an eval statement and pass log variables into these. On certain versions of Windows these log variables have different names (message vs name). So we're wondering how to have an 'OR' statement depending on which name we're given. Thanks.&lt;/P&gt;

&lt;P&gt;For example, we have tried the following:  &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;.... | eval "Event Description"=Message, name | table ... "Event Description"
.... | eval ("Event Description"=Message) OR ("Event Description"=name) | table ... "Event Description"
.... | eval "Event Description"=(Message) OR (name) | table ... "Event Description"
.... | eval "Event Description"=Message OR name | table ... "Event Description"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;None of these seem to work. They usually give us &lt;STRONG&gt;malform eval expression&lt;/STRONG&gt; errors.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Aug 2017 13:21:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-OR-boolean-in-an-eval-expression/m-p/368651#M108654</guid>
      <dc:creator>drizzo</dc:creator>
      <dc:date>2017-08-14T13:21:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to use 'OR' boolean in an eval expression?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-OR-boolean-in-an-eval-expression/m-p/368652#M108655</link>
      <description>&lt;P&gt;Something in the spirit of - &lt;CODE&gt;| eval your_value=if(message="Event Description" OR name="Event Description", "xxxx"," all others")&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Aug 2017 13:41:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-OR-boolean-in-an-eval-expression/m-p/368652#M108655</guid>
      <dc:creator>ddrillic</dc:creator>
      <dc:date>2017-08-14T13:41:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to use 'OR' boolean in an eval expression?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-OR-boolean-in-an-eval-expression/m-p/368653#M108656</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;| eval "Event Description"=coalesce(Message, name)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The above will use &lt;CODE&gt;Message&lt;/CODE&gt; if present, otherwise it will use &lt;CODE&gt;name&lt;/CODE&gt; if present, and if neither are present the field will be null.  Make sure the capitalization matches your system fields exactly.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Aug 2017 14:11:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-OR-boolean-in-an-eval-expression/m-p/368653#M108656</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-08-14T14:11:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to use 'OR' boolean in an eval expression?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-OR-boolean-in-an-eval-expression/m-p/368654#M108657</link>
      <description>&lt;P&gt;Beautiful thing !!!&lt;/P&gt;</description>
      <pubDate>Mon, 14 Aug 2017 14:15:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-OR-boolean-in-an-eval-expression/m-p/368654#M108657</guid>
      <dc:creator>ddrillic</dc:creator>
      <dc:date>2017-08-14T14:15:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to use 'OR' boolean in an eval expression?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-OR-boolean-in-an-eval-expression/m-p/368655#M108658</link>
      <description>&lt;P&gt;This is more than what I was expecting. Thank you very much! Works very well.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Aug 2017 11:02:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-OR-boolean-in-an-eval-expression/m-p/368655#M108658</guid>
      <dc:creator>drizzo</dc:creator>
      <dc:date>2017-08-15T11:02:34Z</dc:date>
    </item>
  </channel>
</rss>

