<?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: If then statement where the output will exclude a value from search. in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/If-then-statement-where-the-output-will-exclude-a-value-from/m-p/291375#M88043</link>
    <description>&lt;P&gt;Something like below?&lt;/P&gt;

&lt;PRE&gt;...| eval fieldA = myEvalFunction | search NOT (fieldA=1 AND fieldB=*)&lt;/PRE&gt;</description>
    <pubDate>Mon, 09 Oct 2017 15:36:38 GMT</pubDate>
    <dc:creator>pradeepkumarg</dc:creator>
    <dc:date>2017-10-09T15:36:38Z</dc:date>
    <item>
      <title>If then statement where the output will exclude a value from search.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/If-then-statement-where-the-output-will-exclude-a-value-from/m-p/291374#M88042</link>
      <description>&lt;P&gt;I want a statement that will evaluate field A, and if the value of field A equals 1, then I want to exclude any value of field B from the search.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Oct 2017 15:27:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/If-then-statement-where-the-output-will-exclude-a-value-from/m-p/291374#M88042</guid>
      <dc:creator>jared_anderson</dc:creator>
      <dc:date>2017-10-09T15:27:47Z</dc:date>
    </item>
    <item>
      <title>Re: If then statement where the output will exclude a value from search.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/If-then-statement-where-the-output-will-exclude-a-value-from/m-p/291375#M88043</link>
      <description>&lt;P&gt;Something like below?&lt;/P&gt;

&lt;PRE&gt;...| eval fieldA = myEvalFunction | search NOT (fieldA=1 AND fieldB=*)&lt;/PRE&gt;</description>
      <pubDate>Mon, 09 Oct 2017 15:36:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/If-then-statement-where-the-output-will-exclude-a-value-from/m-p/291375#M88043</guid>
      <dc:creator>pradeepkumarg</dc:creator>
      <dc:date>2017-10-09T15:36:38Z</dc:date>
    </item>
    <item>
      <title>Re: If then statement where the output will exclude a value from search.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/If-then-statement-where-the-output-will-exclude-a-value-from/m-p/291376#M88044</link>
      <description>&lt;P&gt;So i have email events, where a series of logs have the same Message ID (MID). &lt;/P&gt;

&lt;P&gt;So instead of having to run:&lt;BR /&gt;
sourcetype="email"  | transaction MID | &lt;/P&gt;

&lt;P&gt;I want to limit the number of entries and only search against MailDirectionField=inbound. Not every event has MailDirectionField, but they do have the MID field. so I want my evaluation to state that if MailDirectionField=inbound then NOT MID associated with that event.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Oct 2017 15:46:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/If-then-statement-where-the-output-will-exclude-a-value-from/m-p/291376#M88044</guid>
      <dc:creator>jared_anderson</dc:creator>
      <dc:date>2017-10-09T15:46:24Z</dc:date>
    </item>
    <item>
      <title>Re: If then statement where the output will exclude a value from search.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/If-then-statement-where-the-output-will-exclude-a-value-from/m-p/291377#M88045</link>
      <description>&lt;P&gt;Hi jared_anderson,&lt;BR /&gt;
modify your main search to have only the events you want&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="email" MailDirectionField=inbound | transaction MID | ...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 09 Oct 2017 16:00:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/If-then-statement-where-the-output-will-exclude-a-value-from/m-p/291377#M88045</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2017-10-09T16:00:25Z</dc:date>
    </item>
    <item>
      <title>Re: If then statement where the output will exclude a value from search.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/If-then-statement-where-the-output-will-exclude-a-value-from/m-p/291378#M88046</link>
      <description>&lt;P&gt;Hi jared_anderson,&lt;BR /&gt;
try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; sourcetype="email" MailDirectionField!=outbound | transaction MID | ...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 09 Oct 2017 16:10:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/If-then-statement-where-the-output-will-exclude-a-value-from/m-p/291378#M88046</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2017-10-09T16:10:30Z</dc:date>
    </item>
    <item>
      <title>Re: If then statement where the output will exclude a value from search.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/If-then-statement-where-the-output-will-exclude-a-value-from/m-p/291379#M88047</link>
      <description>&lt;P&gt;the problem with that is then that will only remove one event when there are 20+ events that contain that MID.&lt;/P&gt;

&lt;P&gt;event1, maildirection=outbound, MID=123&lt;BR /&gt;
event2, sourceuser=user1, MID=123&lt;BR /&gt;
event3, destinationuser=user2, MID=123&lt;/P&gt;

&lt;P&gt;event1, maildirection=outbound, MID=124&lt;BR /&gt;
event2, sourceuser=user1, MID=124&lt;BR /&gt;
event3, destinationuser=user2, MID=124&lt;/P&gt;

&lt;P&gt;event1, maildirection=outbound, MID=125&lt;BR /&gt;
event2, sourceuser=user1, MID=125&lt;BR /&gt;
event3, destinationuser=user2, MID=125&lt;/P&gt;

&lt;P&gt;in that last search each event1 would not be returned, but the rest of the events with MID 123, 124 and 125 would be returned. &lt;/P&gt;</description>
      <pubDate>Mon, 09 Oct 2017 17:26:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/If-then-statement-where-the-output-will-exclude-a-value-from/m-p/291379#M88047</guid>
      <dc:creator>jared_anderson</dc:creator>
      <dc:date>2017-10-09T17:26:49Z</dc:date>
    </item>
  </channel>
</rss>

