<?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 transaction on two different fields within the same sourcetype? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-transaction-on-two-different-fields-within-the-same/m-p/364740#M107595</link>
    <description>&lt;P&gt;Yep, coalesce works just right for me, thanks! Didn't know that existed. And it has to be single quotes inside the eval function to work, if I use anything else the resultant value is blank.&lt;/P&gt;</description>
    <pubDate>Mon, 19 Mar 2018 23:40:05 GMT</pubDate>
    <dc:creator>brajaram</dc:creator>
    <dc:date>2018-03-19T23:40:05Z</dc:date>
    <item>
      <title>How to transaction on two different fields within the same sourcetype?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-transaction-on-two-different-fields-within-the-same/m-p/364738#M107593</link>
      <description>&lt;P&gt;I want to join events within the same sourcetype into a single event based on a logID field. However, this logID field can be named in two different ways: &lt;CODE&gt;primary.logID&lt;/CODE&gt; or &lt;CODE&gt;secondary.logID&lt;/CODE&gt;. Our sourcetype has both primary and secondary events, and we use a common logID between them if they are related.&lt;/P&gt;

&lt;P&gt;If I do &lt;CODE&gt;|transaction primary.logID&lt;/CODE&gt; it obviously doesn't work, but I can't rename the two primary and secondary logID's to a new &lt;CODE&gt;logID&lt;/CODE&gt; field, because it is in the same sourcetype. How do I transaction these events together on the same name?&lt;/P&gt;</description>
      <pubDate>Mon, 19 Mar 2018 22:30:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-transaction-on-two-different-fields-within-the-same/m-p/364738#M107593</guid>
      <dc:creator>brajaram</dc:creator>
      <dc:date>2018-03-19T22:30:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to transaction on two different fields within the same sourcetype?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-transaction-on-two-different-fields-within-the-same/m-p/364739#M107594</link>
      <description>&lt;P&gt;Any reason you can't create a new logID field and set it to whichever field has data?  Maybe using &lt;A href="http://docs.splunk.com/Documentation/Splunk/7.0.2/SearchReference/ConditionalFunctions#coalesce.28X.2C....29"&gt;coalesce&lt;/A&gt;?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | eval logID = coalesce('primary.logID','secondary.logID') | transaction logID
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;EM&gt;Note: I can never remember when splunk want single quotes and when it doesn't, but I think it does for fields with a "." but not positive they're needed.&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Mar 2018 23:34:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-transaction-on-two-different-fields-within-the-same/m-p/364739#M107594</guid>
      <dc:creator>maciep</dc:creator>
      <dc:date>2018-03-19T23:34:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to transaction on two different fields within the same sourcetype?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-transaction-on-two-different-fields-within-the-same/m-p/364740#M107595</link>
      <description>&lt;P&gt;Yep, coalesce works just right for me, thanks! Didn't know that existed. And it has to be single quotes inside the eval function to work, if I use anything else the resultant value is blank.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Mar 2018 23:40:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-transaction-on-two-different-fields-within-the-same/m-p/364740#M107595</guid>
      <dc:creator>brajaram</dc:creator>
      <dc:date>2018-03-19T23:40:05Z</dc:date>
    </item>
  </channel>
</rss>

