<?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: Custom field for numbering/naming - requires loop ? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Custom-field-for-numbering-naming-requires-loop/m-p/150368#M42138</link>
    <description>&lt;P&gt;Are you replacing the numbers with names? If so, consider placing the mapping number-&amp;gt;name into a lookup file to not clog your search statement with the list and to ease reuse as well as maintenance.&lt;/P&gt;</description>
    <pubDate>Tue, 22 Jul 2014 02:36:17 GMT</pubDate>
    <dc:creator>martin_mueller</dc:creator>
    <dc:date>2014-07-22T02:36:17Z</dc:date>
    <item>
      <title>Custom field for numbering/naming - requires loop ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Custom-field-for-numbering-naming-requires-loop/m-p/150362#M42132</link>
      <description>&lt;P&gt;Hi Good day Splunkers, &lt;/P&gt;

&lt;P&gt;I was stuck on this simple problem. I want to make a field for my numbering/naming. I believe this can be attain by EVAL command. What I was trying to do is I have to show a table that consist of 11 results. I want to make a field before to it that indicates its name/number. Like 1 for row 1, then 2 for row 2&lt;/P&gt;

&lt;P&gt;example:&lt;/P&gt;

&lt;P&gt;name - result &lt;BR /&gt;&lt;BR /&gt;
1 - 200kb&lt;BR /&gt;&lt;BR /&gt;
2 - 250kb&lt;BR /&gt;&lt;BR /&gt;
3 - 300kb&lt;BR /&gt;&lt;BR /&gt;
4 - 350kb&lt;BR /&gt;&lt;BR /&gt;
5 - 400kb&lt;BR /&gt;&lt;/P&gt;

&lt;P&gt;How will my search be ? I was thinking a loop with eval but don't know where to start&lt;/P&gt;

&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jul 2014 08:10:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Custom-field-for-numbering-naming-requires-loop/m-p/150362#M42132</guid>
      <dc:creator>crt89</dc:creator>
      <dc:date>2014-07-21T08:10:01Z</dc:date>
    </item>
    <item>
      <title>Re: Custom field for numbering/naming - requires loop ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Custom-field-for-numbering-naming-requires-loop/m-p/150363#M42133</link>
      <description>&lt;P&gt;I don't really understand your question, but you can do &lt;CODE&gt;eval&lt;/CODE&gt; loops with &lt;CODE&gt;foreach&lt;/CODE&gt;: &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.1.2/SearchReference/foreach"&gt;http://docs.splunk.com/Documentation/Splunk/6.1.2/SearchReference/foreach&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jul 2014 10:03:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Custom-field-for-numbering-naming-requires-loop/m-p/150363#M42133</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-07-21T10:03:52Z</dc:date>
    </item>
    <item>
      <title>Re: Custom field for numbering/naming - requires loop ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Custom-field-for-numbering-naming-requires-loop/m-p/150364#M42134</link>
      <description>&lt;P&gt;Are you by chance looking for this?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | streamstats count as name
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 21 Jul 2014 11:52:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Custom-field-for-numbering-naming-requires-loop/m-p/150364#M42134</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-07-21T11:52:47Z</dc:date>
    </item>
    <item>
      <title>Re: Custom field for numbering/naming - requires loop ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Custom-field-for-numbering-naming-requires-loop/m-p/150365#M42135</link>
      <description>&lt;P&gt;@martin_mueller Wow thanks, this is what I need. Now how can I make your comment as an answer.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jul 2014 02:11:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Custom-field-for-numbering-naming-requires-loop/m-p/150365#M42135</guid>
      <dc:creator>crt89</dc:creator>
      <dc:date>2014-07-22T02:11:58Z</dc:date>
    </item>
    <item>
      <title>Re: Custom field for numbering/naming - requires loop ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Custom-field-for-numbering-naming-requires-loop/m-p/150366#M42136</link>
      <description>&lt;P&gt;You need more karma to do that, but I can.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jul 2014 02:17:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Custom-field-for-numbering-naming-requires-loop/m-p/150366#M42136</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-07-22T02:17:03Z</dc:date>
    </item>
    <item>
      <title>Re: Custom field for numbering/naming - requires loop ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Custom-field-for-numbering-naming-requires-loop/m-p/150367#M42137</link>
      <description>&lt;P&gt;Thanks ! Now with this streamstats command I can change the numbers to specific values using the case command.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jul 2014 02:32:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Custom-field-for-numbering-naming-requires-loop/m-p/150367#M42137</guid>
      <dc:creator>crt89</dc:creator>
      <dc:date>2014-07-22T02:32:37Z</dc:date>
    </item>
    <item>
      <title>Re: Custom field for numbering/naming - requires loop ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Custom-field-for-numbering-naming-requires-loop/m-p/150368#M42138</link>
      <description>&lt;P&gt;Are you replacing the numbers with names? If so, consider placing the mapping number-&amp;gt;name into a lookup file to not clog your search statement with the list and to ease reuse as well as maintenance.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jul 2014 02:36:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Custom-field-for-numbering-naming-requires-loop/m-p/150368#M42138</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-07-22T02:36:17Z</dc:date>
    </item>
    <item>
      <title>Re: Custom field for numbering/naming - requires loop ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Custom-field-for-numbering-naming-requires-loop/m-p/150369#M42139</link>
      <description>&lt;P&gt;Oh yes didn't thought of that. Thanks again.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jul 2014 02:51:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Custom-field-for-numbering-naming-requires-loop/m-p/150369#M42139</guid>
      <dc:creator>crt89</dc:creator>
      <dc:date>2014-07-22T02:51:29Z</dc:date>
    </item>
  </channel>
</rss>

