<?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 Save value of a field of one event and compare it with all other found events in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Save-value-of-a-field-of-one-event-and-compare-it-with-all-other/m-p/312037#M93470</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I have a list of three events, each of them has the same ID in the field ID. One event containing a field that states PRINT=Y. &lt;BR /&gt;
The other two events being ACTION=PRINT and ACTION=NO_PRINT. &lt;BR /&gt;
I want to add a field that checks if the done action was correct by checking that if PRINT was Y, and the event states ACTION=PRINT its value becomes "ok".&lt;/P&gt;

&lt;P&gt;The table should look like this:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Action -- Validation&lt;/STRONG&gt;&lt;BR /&gt;
1. PRINT -- ok&lt;BR /&gt;
2. NO_PRINT -- error&lt;/P&gt;

&lt;P&gt;How can I do this? If I want to eval a field, it only evaluates the value of the field with PRINT=Y in it, and I can't seem to use it for the other two events. &lt;/P&gt;</description>
    <pubDate>Thu, 06 Apr 2017 09:07:16 GMT</pubDate>
    <dc:creator>ckunath</dc:creator>
    <dc:date>2017-04-06T09:07:16Z</dc:date>
    <item>
      <title>Save value of a field of one event and compare it with all other found events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Save-value-of-a-field-of-one-event-and-compare-it-with-all-other/m-p/312037#M93470</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I have a list of three events, each of them has the same ID in the field ID. One event containing a field that states PRINT=Y. &lt;BR /&gt;
The other two events being ACTION=PRINT and ACTION=NO_PRINT. &lt;BR /&gt;
I want to add a field that checks if the done action was correct by checking that if PRINT was Y, and the event states ACTION=PRINT its value becomes "ok".&lt;/P&gt;

&lt;P&gt;The table should look like this:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Action -- Validation&lt;/STRONG&gt;&lt;BR /&gt;
1. PRINT -- ok&lt;BR /&gt;
2. NO_PRINT -- error&lt;/P&gt;

&lt;P&gt;How can I do this? If I want to eval a field, it only evaluates the value of the field with PRINT=Y in it, and I can't seem to use it for the other two events. &lt;/P&gt;</description>
      <pubDate>Thu, 06 Apr 2017 09:07:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Save-value-of-a-field-of-one-event-and-compare-it-with-all-other/m-p/312037#M93470</guid>
      <dc:creator>ckunath</dc:creator>
      <dc:date>2017-04-06T09:07:16Z</dc:date>
    </item>
    <item>
      <title>Re: Save value of a field of one event and compare it with all other found events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Save-value-of-a-field-of-one-event-and-compare-it-with-all-other/m-p/312038#M93471</link>
      <description>&lt;P&gt;Hi ckunath,&lt;BR /&gt;
you should try something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your_search 
| transaction ID
| eval check=if(PRINT="Y" AND ACTION="PRINT","ok","error")
| table _time PRINT ACTION check
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 06 Apr 2017 10:08:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Save-value-of-a-field-of-one-event-and-compare-it-with-all-other/m-p/312038#M93471</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2017-04-06T10:08:35Z</dc:date>
    </item>
    <item>
      <title>Re: Save value of a field of one event and compare it with all other found events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Save-value-of-a-field-of-one-event-and-compare-it-with-all-other/m-p/312039#M93472</link>
      <description>&lt;P&gt;Hi giuseppe,&lt;/P&gt;

&lt;P&gt;thanks a lot for your quick response!&lt;BR /&gt;
It does work, but it groups all events into one table row and I need to have the events separated..&lt;/P&gt;

&lt;P&gt;For the events&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;20170102 ID=100 ACTION=PRINT
20170102 ID=100 ACTION=NO_PRINT
20170101 ID=100 PRINT=Y
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I need a table like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;2017-01-02 -- PRINT -- ok
2017-01-02 -- NO_PRINT -- error
2017-01-02 --  --
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Do you know a way to do that? I appreciate your help!&lt;/P&gt;</description>
      <pubDate>Thu, 06 Apr 2017 11:00:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Save-value-of-a-field-of-one-event-and-compare-it-with-all-other/m-p/312039#M93472</guid>
      <dc:creator>ckunath</dc:creator>
      <dc:date>2017-04-06T11:00:18Z</dc:date>
    </item>
    <item>
      <title>Re: Save value of a field of one event and compare it with all other found events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Save-value-of-a-field-of-one-event-and-compare-it-with-all-other/m-p/312040#M93473</link>
      <description>&lt;P&gt;Hi Hi ckunath,,&lt;BR /&gt;
last year I did the same question, see the answer &lt;A href="https://answers.splunk.com/answers/341972/how-do-i-separate-the-results-of-a-transaction-to.html"&gt;https://answers.splunk.com/answers/341972/how-do-i-separate-the-results-of-a-transaction-to.html&lt;/A&gt;.&lt;BR /&gt;
Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 06 Apr 2017 11:13:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Save-value-of-a-field-of-one-event-and-compare-it-with-all-other/m-p/312040#M93473</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2017-04-06T11:13:00Z</dc:date>
    </item>
  </channel>
</rss>

