<?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 Manipulating fields within a transaction in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Manipulating-fields-within-a-transaction/m-p/123402#M33306</link>
    <description>&lt;P&gt;What would be the best way to go about manipulating fields within a transaction?  For example, let's say I have the following transaction as part of my search to create a transaction:&lt;/P&gt;

&lt;P&gt;"search text" source="mylog.log" | transaction maxpause=1s  FieldA, FieldB, FieldC, FieldD&lt;/P&gt;

&lt;P&gt;Within each transaction, there are additional fields that I use for creating alerts and reports.  All of the logs have a descriptive field in them called FieldE.  The problem is, sometimes FieldE is very specific and sometimes FieldE does not give me the information I need and requires an additional field, FieldF to get more information (I use a lookup table in both cases).  In a normal case, I would put FieldE into a lookup table and output the DescriptionFieldE and be done.&lt;/P&gt;

&lt;P&gt;In the cases where FieldE is not descriptive enough, I can use FieldF.  FieldF is not present in every log in a transaction.  At a high level, what I am trying to do is within each transaction:&lt;/P&gt;

&lt;P&gt;If there is a value for FieldF, input it into a lookup table and output as DescriptionFieldF.  Create a new field that has both the results of DescriptionFieldE and DescriptionFieldF.  What is the best way to create a new field that is the combination of the results of several other fields?  Basically something like:&lt;/P&gt;

&lt;P&gt;NewField=DescriptionFieldE+DescriptionFieldF (the "results" of both these fields are words so I am not trying to actually add anything together, just combine the results into a single field)&lt;/P&gt;</description>
    <pubDate>Tue, 18 Nov 2014 15:03:51 GMT</pubDate>
    <dc:creator>bcarr12</dc:creator>
    <dc:date>2014-11-18T15:03:51Z</dc:date>
    <item>
      <title>Manipulating fields within a transaction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Manipulating-fields-within-a-transaction/m-p/123402#M33306</link>
      <description>&lt;P&gt;What would be the best way to go about manipulating fields within a transaction?  For example, let's say I have the following transaction as part of my search to create a transaction:&lt;/P&gt;

&lt;P&gt;"search text" source="mylog.log" | transaction maxpause=1s  FieldA, FieldB, FieldC, FieldD&lt;/P&gt;

&lt;P&gt;Within each transaction, there are additional fields that I use for creating alerts and reports.  All of the logs have a descriptive field in them called FieldE.  The problem is, sometimes FieldE is very specific and sometimes FieldE does not give me the information I need and requires an additional field, FieldF to get more information (I use a lookup table in both cases).  In a normal case, I would put FieldE into a lookup table and output the DescriptionFieldE and be done.&lt;/P&gt;

&lt;P&gt;In the cases where FieldE is not descriptive enough, I can use FieldF.  FieldF is not present in every log in a transaction.  At a high level, what I am trying to do is within each transaction:&lt;/P&gt;

&lt;P&gt;If there is a value for FieldF, input it into a lookup table and output as DescriptionFieldF.  Create a new field that has both the results of DescriptionFieldE and DescriptionFieldF.  What is the best way to create a new field that is the combination of the results of several other fields?  Basically something like:&lt;/P&gt;

&lt;P&gt;NewField=DescriptionFieldE+DescriptionFieldF (the "results" of both these fields are words so I am not trying to actually add anything together, just combine the results into a single field)&lt;/P&gt;</description>
      <pubDate>Tue, 18 Nov 2014 15:03:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Manipulating-fields-within-a-transaction/m-p/123402#M33306</guid>
      <dc:creator>bcarr12</dc:creator>
      <dc:date>2014-11-18T15:03:51Z</dc:date>
    </item>
    <item>
      <title>Re: Manipulating fields within a transaction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Manipulating-fields-within-a-transaction/m-p/123403#M33307</link>
      <description>&lt;P&gt;You could do this using the concatenation operator:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| lookup fieldElookup FieldE output DescriptionFieldE
| lookup fieldFlookup FieldF output DescriptionFieldF
| eval newField=DescriptionFieldE . DescriptionFieldF
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 18 Nov 2014 15:42:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Manipulating-fields-within-a-transaction/m-p/123403#M33307</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2014-11-18T15:42:28Z</dc:date>
    </item>
    <item>
      <title>Re: Manipulating fields within a transaction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Manipulating-fields-within-a-transaction/m-p/123404#M33308</link>
      <description>&lt;P&gt;I gave this a shot and it doesn't seem to be working.  I have a value for DescriptionFieldE and DescriptionFieldF, but if I do:&lt;/P&gt;

&lt;P&gt;eval newfiled=DescriptionFieldE . DescriptionFieldF &lt;/P&gt;

&lt;P&gt;It doesn't return any values?  One thing I am unsure of, will this concatenation create one field with one result that has both descriptions in it?  Or one field with two results?&lt;/P&gt;</description>
      <pubDate>Tue, 18 Nov 2014 16:13:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Manipulating-fields-within-a-transaction/m-p/123404#M33308</guid>
      <dc:creator>bcarr12</dc:creator>
      <dc:date>2014-11-18T16:13:43Z</dc:date>
    </item>
  </channel>
</rss>

