<?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 How do I create an eval statement to combine similar fields? in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/How-do-I-create-an-eval-statement-to-combine-similar-fields/m-p/455337#M8288</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;If I have data that looks like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;abc
abc456
xyz
xyz456
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;How could I create an eval statement that says&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;if field1=abc or if field1=field1+456 then field1=field1?
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Meaning, combine "abc" and "abc456", and combine "xyz" and "xyz456" together.&lt;/P&gt;</description>
    <pubDate>Wed, 12 Sep 2018 21:13:59 GMT</pubDate>
    <dc:creator>dbcase</dc:creator>
    <dc:date>2018-09-12T21:13:59Z</dc:date>
    <item>
      <title>How do I create an eval statement to combine similar fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-do-I-create-an-eval-statement-to-combine-similar-fields/m-p/455337#M8288</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;If I have data that looks like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;abc
abc456
xyz
xyz456
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;How could I create an eval statement that says&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;if field1=abc or if field1=field1+456 then field1=field1?
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Meaning, combine "abc" and "abc456", and combine "xyz" and "xyz456" together.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Sep 2018 21:13:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-do-I-create-an-eval-statement-to-combine-similar-fields/m-p/455337#M8288</guid>
      <dc:creator>dbcase</dc:creator>
      <dc:date>2018-09-12T21:13:59Z</dc:date>
    </item>
    <item>
      <title>Re: How do I create an eval statement to combine similar fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-do-I-create-an-eval-statement-to-combine-similar-fields/m-p/455338#M8289</link>
      <description>&lt;P&gt;A bit more info as I think I gave a poor example&lt;/P&gt;

&lt;P&gt;abc can be 3 positions or it could be abcdef (more than 3 positions), however, 456 is always consistent&lt;/P&gt;</description>
      <pubDate>Wed, 12 Sep 2018 22:12:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-do-I-create-an-eval-statement-to-combine-similar-fields/m-p/455338#M8289</guid>
      <dc:creator>dbcase</dc:creator>
      <dc:date>2018-09-12T22:12:55Z</dc:date>
    </item>
    <item>
      <title>Re: How do I create an eval statement to combine similar fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-do-I-create-an-eval-statement-to-combine-similar-fields/m-p/455339#M8290</link>
      <description>&lt;P&gt;Solved it, used the like function&lt;/P&gt;</description>
      <pubDate>Wed, 12 Sep 2018 22:44:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-do-I-create-an-eval-statement-to-combine-similar-fields/m-p/455339#M8290</guid>
      <dc:creator>dbcase</dc:creator>
      <dc:date>2018-09-12T22:44:37Z</dc:date>
    </item>
  </channel>
</rss>

