<?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 combine two fields into one field? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-two-fields-into-one-field/m-p/387115#M112935</link>
    <description>&lt;P&gt;Config as provided in the comments looks fine, but if those fields are not together in 1 event, there is no way this will work using calculated fields. You will need to write a search query that combines the related events somehow, to get that information together.&lt;/P&gt;

&lt;P&gt;If you need help with that, I suggest you create a new question, with proper detailed explanation of what you are trying to achieve.&lt;/P&gt;</description>
    <pubDate>Sun, 14 Jul 2019 10:07:25 GMT</pubDate>
    <dc:creator>FrankVl</dc:creator>
    <dc:date>2019-07-14T10:07:25Z</dc:date>
    <item>
      <title>How to combine two fields into one field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-two-fields-into-one-field/m-p/387101#M112921</link>
      <description>&lt;P&gt;Hello everyone,&lt;BR /&gt;
I have created some fields but now I want to combine the fields, Ex: I have created fields like A B C now I want to create a new field which combine two fields.. EX &lt;STRONG&gt;D&lt;/STRONG&gt;= A+B or D=A+B+C&lt;BR /&gt;
Can any one help me on this? &lt;/P&gt;</description>
      <pubDate>Fri, 12 Jul 2019 12:26:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-two-fields-into-one-field/m-p/387101#M112921</guid>
      <dc:creator>marisstella</dc:creator>
      <dc:date>2019-07-12T12:26:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine two fields into one field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-two-fields-into-one-field/m-p/387102#M112922</link>
      <description>&lt;P&gt;If by "combine" you mean concatenate then you use the concatenation operator within an &lt;CODE&gt;eval&lt;/CODE&gt; statement.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | eval D = A . B . C
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;will create a field 'D' containing the values from fields A, B, C strung together (D=ABC).  You can add text between the elements if you like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | eval D = A . "+" . B . "=" . C
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 12 Jul 2019 13:07:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-two-fields-into-one-field/m-p/387102#M112922</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2019-07-12T13:07:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine two fields into one field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-two-fields-into-one-field/m-p/387103#M112923</link>
      <description>&lt;P&gt;Hello  richgalloway,&lt;BR /&gt;
Thanks for your reply, I have tried that like &lt;STRONG&gt;eval report=A . "-" .B&lt;/STRONG&gt;&lt;BR /&gt;
It is working and behaving report as a new field but we can't run the SPL query every time.. So I'm planing to create a new field which combines the two fields which I have created and working successfully.....&lt;BR /&gt;
When I run the SPL Query, eval repor= duration. "-" .action   it  combines these two fields... &lt;BR /&gt;
So they can see how much time was taken to complete the action... is there a way to add two fields and make them as third field???&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jul 2019 13:18:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-two-fields-into-one-field/m-p/387103#M112923</guid>
      <dc:creator>marisstella</dc:creator>
      <dc:date>2019-07-12T13:18:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine two fields into one field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-two-fields-into-one-field/m-p/387104#M112924</link>
      <description>&lt;P&gt;Yes, just define a calculated field with that same eval expression in it.&lt;/P&gt;

&lt;P&gt;In the GUI under Settings -&amp;gt; Fields -&amp;gt; Calculated Fields. Or directly in props.conf under the respective sourcetype: &lt;CODE&gt;EVAL-report = A . "-" .B&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jul 2019 13:29:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-two-fields-into-one-field/m-p/387104#M112924</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2019-07-12T13:29:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine two fields into one field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-two-fields-into-one-field/m-p/387105#M112925</link>
      <description>&lt;P&gt;Okay, but one question?&lt;BR /&gt;
EVAL-report =A . "-" .B&lt;BR /&gt;
So here, the A and B are name of the fields or regular expression of the A and B fields? &lt;/P&gt;</description>
      <pubDate>Fri, 12 Jul 2019 14:12:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-two-fields-into-one-field/m-p/387105#M112925</guid>
      <dc:creator>marisstella</dc:creator>
      <dc:date>2019-07-12T14:12:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine two fields into one field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-two-fields-into-one-field/m-p/387106#M112926</link>
      <description>&lt;P&gt;The names of those fields (assuming you already have extractions defined for those fields).&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jul 2019 14:14:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-two-fields-into-one-field/m-p/387106#M112926</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2019-07-12T14:14:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine two fields into one field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-two-fields-into-one-field/m-p/387107#M112927</link>
      <description>&lt;P&gt;Yes, I have created fields already.. In settings&amp;gt;fields&amp;gt;calculatedfields&amp;gt; selected sourcetype after that it is asking eval expression..&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jul 2019 14:28:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-two-fields-into-one-field/m-p/387107#M112927</guid>
      <dc:creator>marisstella</dc:creator>
      <dc:date>2019-07-12T14:28:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine two fields into one field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-two-fields-into-one-field/m-p/387108#M112928</link>
      <description>&lt;P&gt;I have given name &lt;BR /&gt;
Eval Expresion = EVAL-report = timeendpos. "-" .timestartpos&lt;/P&gt;

&lt;P&gt;then it gave this error: Encountered the following error while trying to save: In handler 'props-eval': Operator types incompatible&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jul 2019 14:35:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-two-fields-into-one-field/m-p/387108#M112928</guid>
      <dc:creator>marisstella</dc:creator>
      <dc:date>2019-07-12T14:35:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine two fields into one field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-two-fields-into-one-field/m-p/387109#M112929</link>
      <description>&lt;P&gt;If you're creating the calculated field through the GUI, you just need the eval expression itself, not the &lt;CODE&gt;EVAL-report =&lt;/CODE&gt; bit. So just enter &lt;CODE&gt;timeendpos. "-" .timestartpos&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jul 2019 14:39:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-two-fields-into-one-field/m-p/387109#M112929</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2019-07-12T14:39:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine two fields into one field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-two-fields-into-one-field/m-p/387110#M112930</link>
      <description>&lt;P&gt;Hiiii, it  didn't work..  Any suggestions? &lt;/P&gt;</description>
      <pubDate>Sat, 13 Jul 2019 04:47:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-two-fields-into-one-field/m-p/387110#M112930</guid>
      <dc:creator>marisstella</dc:creator>
      <dc:date>2019-07-13T04:47:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine two fields into one field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-two-fields-into-one-field/m-p/387111#M112931</link>
      <description>&lt;P&gt;Can you create a screenshot of the calculated field settings? Upload it to some imagehost and share the url here.&lt;/P&gt;</description>
      <pubDate>Sun, 14 Jul 2019 08:38:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-two-fields-into-one-field/m-p/387111#M112931</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2019-07-14T08:38:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine two fields into one field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-two-fields-into-one-field/m-p/387112#M112932</link>
      <description>&lt;P&gt;Hi FrankVI, thank you so much for your reply.. I should complete this by Monday morning.. &lt;BR /&gt;
here are the requested URL's&lt;BR /&gt;
&lt;A href="https://ibb.co/R6ZX1Rs"&gt;https://ibb.co/R6ZX1Rs&lt;/A&gt;&lt;BR /&gt;
&lt;A href="https://ibb.co/ZVV6dZk"&gt;https://ibb.co/ZVV6dZk&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 14 Jul 2019 08:54:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-two-fields-into-one-field/m-p/387112#M112932</guid>
      <dc:creator>marisstella</dc:creator>
      <dc:date>2019-07-14T08:54:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine two fields into one field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-two-fields-into-one-field/m-p/387113#M112933</link>
      <description>&lt;P&gt;Can you also open the calculated fields to see how you configured it?&lt;/P&gt;

&lt;P&gt;Also: from what I can see from your search screenshot, the 2 events with an MTP value do not have a Duration value. So then of course the calculation fails.&lt;/P&gt;</description>
      <pubDate>Sun, 14 Jul 2019 08:59:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-two-fields-into-one-field/m-p/387113#M112933</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2019-07-14T08:59:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine two fields into one field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-two-fields-into-one-field/m-p/387114#M112934</link>
      <description>&lt;P&gt;Here Duration and MTP both  are completely different eachother.. &lt;BR /&gt;
my query is to merge these two fields by creating new field... &lt;BR /&gt;
here MTP means action and Duration means time.. &lt;BR /&gt;
if I merge these fields, the client will get know "ACtion completed by 55 sec" by clicking on single field....&lt;/P&gt;

&lt;P&gt;&lt;A href="https://ibb.co/hBG9NMt"&gt;https://ibb.co/hBG9NMt&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 14 Jul 2019 09:24:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-two-fields-into-one-field/m-p/387114#M112934</guid>
      <dc:creator>marisstella</dc:creator>
      <dc:date>2019-07-14T09:24:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine two fields into one field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-two-fields-into-one-field/m-p/387115#M112935</link>
      <description>&lt;P&gt;Config as provided in the comments looks fine, but if those fields are not together in 1 event, there is no way this will work using calculated fields. You will need to write a search query that combines the related events somehow, to get that information together.&lt;/P&gt;

&lt;P&gt;If you need help with that, I suggest you create a new question, with proper detailed explanation of what you are trying to achieve.&lt;/P&gt;</description>
      <pubDate>Sun, 14 Jul 2019 10:07:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-two-fields-into-one-field/m-p/387115#M112935</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2019-07-14T10:07:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine two fields into one field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-two-fields-into-one-field/m-p/387116#M112936</link>
      <description>&lt;P&gt;Hii, it didn't work...&lt;BR /&gt;
I want to create new field by combining existing field... &lt;/P&gt;</description>
      <pubDate>Mon, 15 Jul 2019 05:43:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-two-fields-into-one-field/m-p/387116#M112936</guid>
      <dc:creator>marisstella</dc:creator>
      <dc:date>2019-07-15T05:43:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine two fields into one field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-two-fields-into-one-field/m-p/387117#M112937</link>
      <description>&lt;P&gt;See my answer below, and stop just kicking your question without adding any new information. As explained: what you want is impossible with calculated fields. You cannot combine fields from 2 separate events like that.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jul 2019 07:10:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-two-fields-into-one-field/m-p/387117#M112937</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2019-07-15T07:10:29Z</dc:date>
    </item>
  </channel>
</rss>

