<?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: What's the order of search time field extraction in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/What-s-the-order-of-search-time-field-extraction/m-p/132245#M36056</link>
    <description>&lt;P&gt;I worked out why mine wasn't working, I had the EVAL-Company in the host::* section, but had the REPORT-Company in the sourcetype stanza and I read that precedence is host first, so my Company field did not exist when it tried to make the substitutions.  Fixed that and it worked.&lt;/P&gt;

&lt;P&gt;Thanks for all the comments.&lt;/P&gt;</description>
    <pubDate>Fri, 08 Nov 2013 06:02:22 GMT</pubDate>
    <dc:creator>bowesmana</dc:creator>
    <dc:date>2013-11-08T06:02:22Z</dc:date>
    <item>
      <title>What's the order of search time field extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-s-the-order-of-search-time-field-extraction/m-p/132241#M36052</link>
      <description>&lt;P&gt;I have data like&lt;/P&gt;

&lt;P&gt;whrchan-ros,FirstName,LastName,End User,Activated,Major Account,Group,Direct sales&lt;/P&gt;

&lt;P&gt;I want to create a Company field at search time, which is the 3 character suffix.  I have a field transform, which is&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;.*-(?&amp;lt;Company&amp;gt;[a-z]*$)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;but I also want to convert any suffixes that are ros, to be rhk, so I have an eval calculated field of&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Company=if(Company="ros","rhk",Company) 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If I use eval in the search command it works, but it's not working via the calculated field definition, so I guess it's an order issue.&lt;/P&gt;

&lt;P&gt;How can I make that substitution after the Company has first been extracted.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Nov 2013 09:33:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-s-the-order-of-search-time-field-extraction/m-p/132241#M36052</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2013-11-07T09:33:52Z</dc:date>
    </item>
    <item>
      <title>Re: What's the order of search time field extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-s-the-order-of-search-time-field-extraction/m-p/132242#M36053</link>
      <description>&lt;P&gt;Calculated fields happen &lt;STRONG&gt;after&lt;/STRONG&gt; field extractions (EXTRACT-aaa, REPORT-aaa). In your props.conf file enter the following and check again:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;[my_sourcetype]&lt;BR /&gt;
EXTRACT-company = .*-(?&amp;lt;Company&amp;gt;[a-z]*$)&lt;BR /&gt;
EVAL-Company = if(Company="ros","rhk",Company)&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Nov 2013 14:33:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-s-the-order-of-search-time-field-extraction/m-p/132242#M36053</guid>
      <dc:creator>_d_</dc:creator>
      <dc:date>2013-11-07T14:33:05Z</dc:date>
    </item>
    <item>
      <title>Re: What's the order of search time field extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-s-the-order-of-search-time-field-extraction/m-p/132243#M36054</link>
      <description>&lt;P&gt;Ensure that field name is same in both the stanza.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Nov 2013 19:00:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-s-the-order-of-search-time-field-extraction/m-p/132243#M36054</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2013-11-07T19:00:58Z</dc:date>
    </item>
    <item>
      <title>Re: What's the order of search time field extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-s-the-order-of-search-time-field-extraction/m-p/132244#M36055</link>
      <description>&lt;P&gt;No, in EXTRACT-xxx, the &lt;CODE&gt;xxx&lt;/CODE&gt; can be anything as long as it's unique within a stanza. In EVAL-xxx, the &lt;CODE&gt;xxx&lt;/CODE&gt; &lt;STRONG&gt;must&lt;/STRONG&gt; be the field name.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Nov 2013 19:04:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-s-the-order-of-search-time-field-extraction/m-p/132244#M36055</guid>
      <dc:creator>_d_</dc:creator>
      <dc:date>2013-11-07T19:04:42Z</dc:date>
    </item>
    <item>
      <title>Re: What's the order of search time field extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-s-the-order-of-search-time-field-extraction/m-p/132245#M36056</link>
      <description>&lt;P&gt;I worked out why mine wasn't working, I had the EVAL-Company in the host::* section, but had the REPORT-Company in the sourcetype stanza and I read that precedence is host first, so my Company field did not exist when it tried to make the substitutions.  Fixed that and it worked.&lt;/P&gt;

&lt;P&gt;Thanks for all the comments.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Nov 2013 06:02:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-s-the-order-of-search-time-field-extraction/m-p/132245#M36056</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2013-11-08T06:02:22Z</dc:date>
    </item>
    <item>
      <title>Re: What's the order of search time field extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-s-the-order-of-search-time-field-extraction/m-p/132246#M36057</link>
      <description>&lt;P&gt;Splunk now documents this very well.   I highly recommend the &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.5.0/Knowledge/Searchtimeoperationssequence"&gt;The sequence of search-time operations&lt;/A&gt; page.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Oct 2016 17:30:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-s-the-order-of-search-time-field-extraction/m-p/132246#M36057</guid>
      <dc:creator>Lowell</dc:creator>
      <dc:date>2016-10-25T17:30:02Z</dc:date>
    </item>
  </channel>
</rss>

