<?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 [Help] Creating a new Field for matching Value in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Help-Creating-a-new-Field-for-matching-Value/m-p/108551#M183471</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Currently, my Splunk search is:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="Blacklist" OR sourcetype="log" | eval blacklisted=if(sourcetype=="Blacklist",_raw,null()) | fields - _raw | fields blacklisted,SRC 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I am able to see two fields, &lt;EM&gt;blacklisted&lt;/EM&gt; and &lt;EM&gt;SRC&lt;/EM&gt;.&lt;/P&gt;

&lt;P&gt;May i ask if it is possible to do the following:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;Create a new field to store values that matches between the 2 fields.&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;Thanks a lot!&lt;/P&gt;</description>
    <pubDate>Sun, 28 Jul 2013 14:14:54 GMT</pubDate>
    <dc:creator>Zyon</dc:creator>
    <dc:date>2013-07-28T14:14:54Z</dc:date>
    <item>
      <title>[Help] Creating a new Field for matching Value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-Creating-a-new-Field-for-matching-Value/m-p/108551#M183471</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Currently, my Splunk search is:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="Blacklist" OR sourcetype="log" | eval blacklisted=if(sourcetype=="Blacklist",_raw,null()) | fields - _raw | fields blacklisted,SRC 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I am able to see two fields, &lt;EM&gt;blacklisted&lt;/EM&gt; and &lt;EM&gt;SRC&lt;/EM&gt;.&lt;/P&gt;

&lt;P&gt;May i ask if it is possible to do the following:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;Create a new field to store values that matches between the 2 fields.&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;Thanks a lot!&lt;/P&gt;</description>
      <pubDate>Sun, 28 Jul 2013 14:14:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-Creating-a-new-Field-for-matching-Value/m-p/108551#M183471</guid>
      <dc:creator>Zyon</dc:creator>
      <dc:date>2013-07-28T14:14:54Z</dc:date>
    </item>
    <item>
      <title>Re: [Help] Creating a new Field for matching Value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-Creating-a-new-Field-for-matching-Value/m-p/108552#M183472</link>
      <description>&lt;P&gt;If by "matches between the 2 fields" you mean if they equal each other, you can do this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="Blacklist" OR sourcetype="log" | eval blacklisted=if(sourcetype=="Blacklist",_raw,null()) | fields - _raw | fields blacklisted,SRC | eval matches = if(blacklisted==SRC, "match", "no match")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you're thinking of something else then please elaborate.&lt;/P&gt;</description>
      <pubDate>Sun, 28 Jul 2013 18:38:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-Creating-a-new-Field-for-matching-Value/m-p/108552#M183472</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2013-07-28T18:38:19Z</dc:date>
    </item>
    <item>
      <title>Re: [Help] Creating a new Field for matching Value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-Creating-a-new-Field-for-matching-Value/m-p/108553#M183473</link>
      <description>&lt;P&gt;I think you should look at this:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0.3/SearchReference/CommonEvalFunctions"&gt;http://docs.splunk.com/Documentation/Splunk/5.0.3/SearchReference/CommonEvalFunctions&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 28 Jul 2013 22:21:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-Creating-a-new-Field-for-matching-Value/m-p/108553#M183473</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2013-07-28T22:21:50Z</dc:date>
    </item>
    <item>
      <title>Re: [Help] Creating a new Field for matching Value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-Creating-a-new-Field-for-matching-Value/m-p/108554#M183474</link>
      <description>&lt;P&gt;Yes, this is what i'm thinking of. Thanks a lot!&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jul 2013 00:44:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-Creating-a-new-Field-for-matching-Value/m-p/108554#M183474</guid>
      <dc:creator>Zyon</dc:creator>
      <dc:date>2013-07-29T00:44:45Z</dc:date>
    </item>
    <item>
      <title>Re: [Help] Creating a new Field for matching Value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-Creating-a-new-Field-for-matching-Value/m-p/108555#M183475</link>
      <description>&lt;P&gt;Thanks a lot!&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jul 2013 00:45:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-Creating-a-new-Field-for-matching-Value/m-p/108555#M183475</guid>
      <dc:creator>Zyon</dc:creator>
      <dc:date>2013-07-29T00:45:10Z</dc:date>
    </item>
  </channel>
</rss>

