<?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 Dynamically order in mvappend in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Dynamically-order-in-mvappend/m-p/670303#M229805</link>
    <description>&lt;P&gt;I have some data where I want to write the values of "test_n" (n in 1,2,...20) into a multivalue field and keep the&amp;nbsp; numeric order. My attempt is to create the fields in a subsearch and pass to "mvapend()". This does not work.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults count=20
| streamstats count
| eval test_{count}=count
| stats first(test*) AS test*
| eval x=mvappend([| makeresults count=20
| streamstats count AS count
| eval field_names="test".count
| stats list(field_names) AS field_names
| nomv field_names
| eval field_names=replace(field_names," ",", ")
|return $field_names])&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Is there any alternative to spelling out:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval x=mvappend(test_1,...test_20)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;by hand?&lt;/P&gt;</description>
    <pubDate>Thu, 30 Nov 2023 11:43:19 GMT</pubDate>
    <dc:creator>duesser</dc:creator>
    <dc:date>2023-11-30T11:43:19Z</dc:date>
    <item>
      <title>Dynamically order in mvappend</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dynamically-order-in-mvappend/m-p/670303#M229805</link>
      <description>&lt;P&gt;I have some data where I want to write the values of "test_n" (n in 1,2,...20) into a multivalue field and keep the&amp;nbsp; numeric order. My attempt is to create the fields in a subsearch and pass to "mvapend()". This does not work.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults count=20
| streamstats count
| eval test_{count}=count
| stats first(test*) AS test*
| eval x=mvappend([| makeresults count=20
| streamstats count AS count
| eval field_names="test".count
| stats list(field_names) AS field_names
| nomv field_names
| eval field_names=replace(field_names," ",", ")
|return $field_names])&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Is there any alternative to spelling out:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval x=mvappend(test_1,...test_20)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;by hand?&lt;/P&gt;</description>
      <pubDate>Thu, 30 Nov 2023 11:43:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dynamically-order-in-mvappend/m-p/670303#M229805</guid>
      <dc:creator>duesser</dc:creator>
      <dc:date>2023-11-30T11:43:19Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically order in mvappend</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dynamically-order-in-mvappend/m-p/670304#M229806</link>
      <description>&lt;P&gt;You are missing an underscore!&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults count=20
| streamstats count
| eval test_{count}=count
| stats first(test*) AS test*
| eval x=mvappend([| makeresults count=20
| streamstats count AS count
| eval field_names="test_".count
| stats list(field_names) AS field_names
| nomv field_names
| eval field_names=replace(field_names," ",", ")
|return $field_names])&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 30 Nov 2023 12:18:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dynamically-order-in-mvappend/m-p/670304#M229806</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-11-30T12:18:58Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically order in mvappend</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dynamically-order-in-mvappend/m-p/670312#M229808</link>
      <description>&lt;P&gt;Well... thanks &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Nov 2023 12:49:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dynamically-order-in-mvappend/m-p/670312#M229808</guid>
      <dc:creator>duesser</dc:creator>
      <dc:date>2023-11-30T12:49:39Z</dc:date>
    </item>
  </channel>
</rss>

