<?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: Creating a multivalue field from a result? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Creating-a-multivalue-field-from-a-result/m-p/190495#M54857</link>
    <description>&lt;P&gt;Try split command.&lt;/P&gt;

&lt;P&gt;| &lt;YOUR custom="" command=""&gt; | eval fieldName=split(fieldName, ",")&lt;/YOUR&gt;&lt;/P&gt;

&lt;P&gt;This will split value in the fieldName by comma and create a multivalued field out of it.&lt;/P&gt;</description>
    <pubDate>Thu, 26 Dec 2013 21:44:22 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2013-12-26T21:44:22Z</dc:date>
    <item>
      <title>Creating a multivalue field from a result?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Creating-a-multivalue-field-from-a-result/m-p/190494#M54856</link>
      <description>&lt;P&gt;Hey everyone,&lt;/P&gt;

&lt;P&gt;So this feels like something I should be able to do with the standard search language, but I am failing at it.&lt;/P&gt;

&lt;P&gt;I have a result, coming from a custom command, that contains field like this:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;entries.0.category\_name, entries.1.category\_name,...,entries.n.category\_name&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;I would like to take all of these and either create a multi-value field with all of the values in them, or create just one string joining all of the values of entries.*.category_name together, with a comma.&lt;/P&gt;

&lt;P&gt;I want something like:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;| eval mvjoin(entries.*.category_name, ",")&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;But Splunk does not like that.&lt;/P&gt;

&lt;P&gt;Any thoughts?&lt;/P&gt;

&lt;P&gt;Thanks,&lt;/P&gt;

&lt;P&gt;Dave&lt;/P&gt;</description>
      <pubDate>Thu, 26 Dec 2013 16:39:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Creating-a-multivalue-field-from-a-result/m-p/190494#M54856</guid>
      <dc:creator>dshpritz</dc:creator>
      <dc:date>2013-12-26T16:39:07Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a multivalue field from a result?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Creating-a-multivalue-field-from-a-result/m-p/190495#M54857</link>
      <description>&lt;P&gt;Try split command.&lt;/P&gt;

&lt;P&gt;| &lt;YOUR custom="" command=""&gt; | eval fieldName=split(fieldName, ",")&lt;/YOUR&gt;&lt;/P&gt;

&lt;P&gt;This will split value in the fieldName by comma and create a multivalued field out of it.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Dec 2013 21:44:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Creating-a-multivalue-field-from-a-result/m-p/190495#M54857</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2013-12-26T21:44:22Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a multivalue field from a result?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Creating-a-multivalue-field-from-a-result/m-p/190496#M54858</link>
      <description>&lt;P&gt;Hey somesoni2,&lt;/P&gt;

&lt;P&gt;Thanks for the suggestion, but I want to join the values across an unknown number of fields, each named entries.n.category. That is, my example above is the field names, not the value in the fields.&lt;/P&gt;

&lt;P&gt;Thanks,&lt;/P&gt;

&lt;P&gt;Dave&lt;/P&gt;</description>
      <pubDate>Thu, 26 Dec 2013 21:59:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Creating-a-multivalue-field-from-a-result/m-p/190496#M54858</guid>
      <dc:creator>dshpritz</dc:creator>
      <dc:date>2013-12-26T21:59:59Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a multivalue field from a result?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Creating-a-multivalue-field-from-a-result/m-p/190497#M54859</link>
      <description>&lt;P&gt;So basically he has fields that are named "entries.InsertNumberHere.category_name" and would like to combine them into one multi-value field. Variably Named columns.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Dec 2013 22:18:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Creating-a-multivalue-field-from-a-result/m-p/190497#M54859</guid>
      <dc:creator>aelliott</dc:creator>
      <dc:date>2013-12-26T22:18:16Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a multivalue field from a result?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Creating-a-multivalue-field-from-a-result/m-p/190498#M54860</link>
      <description>&lt;P&gt;Try this: &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;...| eval categories = "" | foreach entries.*.category_name [eval categories='&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;' + "," + categories]| makemv delim="," categories&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Dec 2013 18:49:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Creating-a-multivalue-field-from-a-result/m-p/190498#M54860</guid>
      <dc:creator>_d_</dc:creator>
      <dc:date>2013-12-27T18:49:27Z</dc:date>
    </item>
  </channel>
</rss>

