<?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: Eval from Multivalue field in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Help-with-Eval-from-Multivalue-field/m-p/620019#M215510</link>
    <description>&lt;P&gt;Assuming&amp;nbsp; that Ing values are always formatted as a phone number:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex field=Logs "\"(?&amp;lt;ing_values&amp;gt;\d\-\d{3}\-\d+)\""
| eval ing_6=MVINDEX(ing_values, 6)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 08 Nov 2022 02:00:34 GMT</pubDate>
    <dc:creator>johnhuang</dc:creator>
    <dc:date>2022-11-08T02:00:34Z</dc:date>
    <item>
      <title>Help with Eval from Multivalue field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-Eval-from-Multivalue-field/m-p/620014#M215505</link>
      <description>&lt;P&gt;I have a dataset with a multiline field called Logs. The field typically has values like the below,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;  "mId": "Null",
  "deviceID": "a398Z389j",
  "cSession": "443",
  "cWeb": "443",
  "uWeb": "Mixed",
  "s": "Steak",
  "Ing": [
    "1-555-5555555",
    "1-888-8888888"
  ],
  "Sem": [
    "Warehouse@Forest.box"
  ]&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'd like to make it so I can identify the values within "Ing" and easily search where a specific value is in "Ing" for other events. I was able to break it out and split on the comma and then look at the index number 6 but this only returns the 1st item, where in most events there are multiple (upwards of 10) items.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;| eval a = mvindex(split(Logs,","), 6)

  "Ing": [
    "1-555-5555555"&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Thoughts on how to get a complete list of the items in Ing?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Nov 2022 16:03:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-Eval-from-Multivalue-field/m-p/620014#M215505</guid>
      <dc:creator>ff170a</dc:creator>
      <dc:date>2022-11-08T16:03:58Z</dc:date>
    </item>
    <item>
      <title>Re: Eval from Multivalue field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-Eval-from-Multivalue-field/m-p/620019#M215510</link>
      <description>&lt;P&gt;Assuming&amp;nbsp; that Ing values are always formatted as a phone number:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex field=Logs "\"(?&amp;lt;ing_values&amp;gt;\d\-\d{3}\-\d+)\""
| eval ing_6=MVINDEX(ing_values, 6)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Nov 2022 02:00:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-Eval-from-Multivalue-field/m-p/620019#M215510</guid>
      <dc:creator>johnhuang</dc:creator>
      <dc:date>2022-11-08T02:00:34Z</dc:date>
    </item>
    <item>
      <title>Re: Eval from Multivalue field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-Eval-from-Multivalue-field/m-p/620021#M215512</link>
      <description>&lt;P&gt;Thanks for the response. The numbers do appear in a phone number format, but are not phone numbers.&lt;/P&gt;&lt;P&gt;If I use that rex on my data, I only get the first item in the ing field, and not all of the items, which is what I am trying to gather.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Nov 2022 02:15:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-Eval-from-Multivalue-field/m-p/620021#M215512</guid>
      <dc:creator>ff170a</dc:creator>
      <dc:date>2022-11-08T02:15:05Z</dc:date>
    </item>
    <item>
      <title>Re: Eval from Multivalue field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-Eval-from-Multivalue-field/m-p/620023#M215513</link>
      <description>&lt;P&gt;Adding a max_match=10 resolved that issue. Looks like I got what I need. Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 08 Nov 2022 02:23:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-Eval-from-Multivalue-field/m-p/620023#M215513</guid>
      <dc:creator>ff170a</dc:creator>
      <dc:date>2022-11-08T02:23:08Z</dc:date>
    </item>
  </channel>
</rss>

