<?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: Getting a field value from the previous event in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Getting-a-field-value-from-the-previous-event/m-p/53964#M13172</link>
    <description>&lt;P&gt;Use the parameter "current=f" in streamstats.&lt;/P&gt;</description>
    <pubDate>Fri, 05 Aug 2011 12:27:34 GMT</pubDate>
    <dc:creator>gkanapathy</dc:creator>
    <dc:date>2011-08-05T12:27:34Z</dc:date>
    <item>
      <title>Getting a field value from the previous event</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Getting-a-field-value-from-the-previous-event/m-p/53963#M13171</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;

&lt;P&gt;I'd like to retrieve a field value from the previous event. I've used streamstats last(myfield), but this takes the value from the current event and not from the previous one.&lt;/P&gt;

&lt;P&gt;Explanation: I have:&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;field1=abc, field2=abc2&lt;/LI&gt;
&lt;LI&gt;field1=def, field2=def2&lt;/LI&gt;
&lt;LI&gt;field1=ghi, field2=ghi2&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;I'd like to have:&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;field1=abc, field2=abc2, oldfield2=   (or nothing)&lt;/LI&gt;
&lt;LI&gt;field1=def, field2=def2, oldfield2=abc2&lt;/LI&gt;
&lt;LI&gt;field1=ghi, field2=ghi2, oldfield2=def2&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;Using "streamstats last()" gives me:&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;field1=abc, field2=abc2, oldfield2=abc2&lt;/LI&gt;
&lt;LI&gt;field1=def, field2=def2, oldfield2=def2&lt;/LI&gt;
&lt;LI&gt;field1=ghi, field2=ghi2, oldfield2=ghi2&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;Would anyone have any idea?&lt;/P&gt;

&lt;P&gt;Regards,&lt;BR /&gt;
Olivier&lt;/P&gt;</description>
      <pubDate>Fri, 05 Aug 2011 10:14:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Getting-a-field-value-from-the-previous-event/m-p/53963#M13171</guid>
      <dc:creator>OL</dc:creator>
      <dc:date>2011-08-05T10:14:00Z</dc:date>
    </item>
    <item>
      <title>Re: Getting a field value from the previous event</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Getting-a-field-value-from-the-previous-event/m-p/53964#M13172</link>
      <description>&lt;P&gt;Use the parameter "current=f" in streamstats.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Aug 2011 12:27:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Getting-a-field-value-from-the-previous-event/m-p/53964#M13172</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2011-08-05T12:27:34Z</dc:date>
    </item>
    <item>
      <title>Re: Getting a field value from the previous event</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Getting-a-field-value-from-the-previous-event/m-p/53965#M13173</link>
      <description>&lt;P&gt;It seems to have a documentation mistake on the default value for the "current" parameter. It mentions the default is be false while if you don't set this parameter in the command, it sets it to true! I'm using version 4.2.2, build 101277.&lt;/P&gt;

&lt;P&gt;Thank you very much for your answer.&lt;/P&gt;

&lt;P&gt;Regards, Olivier&lt;/P&gt;</description>
      <pubDate>Mon, 08 Aug 2011 10:12:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Getting-a-field-value-from-the-previous-event/m-p/53965#M13173</guid>
      <dc:creator>OL</dc:creator>
      <dc:date>2011-08-08T10:12:33Z</dc:date>
    </item>
    <item>
      <title>Re: Getting a field value from the previous event</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Getting-a-field-value-from-the-previous-event/m-p/53966#M13174</link>
      <description>&lt;P&gt;You can add a comment/note to the docs (online), or email &lt;A href="mailto:docs@splunk.com"&gt;docs@splunk.com&lt;/A&gt;.  Otherwise this comment may go unnoticed.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Aug 2011 18:22:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Getting-a-field-value-from-the-previous-event/m-p/53966#M13174</guid>
      <dc:creator>Lowell</dc:creator>
      <dc:date>2011-08-08T18:22:47Z</dc:date>
    </item>
  </channel>
</rss>

