<?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: Extract multivalue data to dynamic fields in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-multivalue-data-to-dynamic-fields/m-p/646607#M223814</link>
    <description>&lt;P&gt;After some more searching I stumbled on&amp;nbsp;mvexpand and had to add it to expand the temp field like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults 
| eval DICOMQuery="(0008,0052) Query/Retrieve Level [SERIES] | (0010,0020) Patient ID [1234567] | (0020,000D) Study Instance UID [1.2.34.567890.12.3456.789.123456.7.20230501130047.4915859] | (0020,000E) Series Instance UID [1.2.345.678.90.1.23456789012.34567890.20230508110959]"
| eval temp=split(DICOMQuery,"|") 
| mvexpand temp
| rex field=temp "(?&amp;lt;DICOMGroup&amp;gt;([\dA-Fa-f]{4})),\d?(?&amp;lt;DICOMElement&amp;gt;([\dA-Fa-f]{4}))\)\s+(?&amp;lt;DICOMLabel&amp;gt;[^\[]+)\s\[(?&amp;lt;DICOMValue&amp;gt;[^\]]+)\]"
| eval {DICOMLabel}=DICOMValue
| fields - DICOMQuery DICOMLabel, DICOMValue temp&lt;/LI-CODE&gt;</description>
    <pubDate>Mon, 12 Jun 2023 09:50:33 GMT</pubDate>
    <dc:creator>jmartens</dc:creator>
    <dc:date>2023-06-12T09:50:33Z</dc:date>
    <item>
      <title>How to extract multivalue data to dynamic fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-multivalue-data-to-dynamic-fields/m-p/646605#M223813</link>
      <description>&lt;P&gt;I am trying to extract multi value fields and set dynamic fields with values based on the extracted data. I am able to extract the data but am unable to do the last part and generate dynamic fields, only the first is generated:&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;| makeresults 
| eval DICOMQuery="(0008,0052) Query/Retrieve Level [SERIES] | (0010,0020) Patient ID [1234567] | (0020,000D) Study Instance UID [1.2.34.567890.12.3456.789.123456.7.20230501130047.4915859] | (0020,000E) Series Instance UID [1.2.345.678.90.1.23456789012.34567890.20230508110959]"
| eval temp=split(DICOMQuery,"|") 
| rex field=temp "(?&amp;lt;DICOMGroup&amp;gt;([\dA-Fa-f]{4})),\d?(?&amp;lt;DICOMElement&amp;gt;([\dA-Fa-f]{4}))\)\s+(?&amp;lt;DICOMLabel&amp;gt;[^\[]+)\s\[(?&amp;lt;DICOMValue&amp;gt;[^\]]+)\]"
| eval {DICOMLabel}=DICOMValue
| fields - DICOMQuery DICOMLabel, DICOMValue temp&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Which yields the following:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jmartens_0-1686563048323.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/25780iA4E20B5B4F9D33EC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jmartens_0-1686563048323.png" alt="jmartens_0-1686563048323.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;It seems I am nearly there, but I fail to get them as individual searchable fields which is what I am after. Any pointers?&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jun 2023 13:31:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-multivalue-data-to-dynamic-fields/m-p/646605#M223813</guid>
      <dc:creator>jmartens</dc:creator>
      <dc:date>2023-06-12T13:31:04Z</dc:date>
    </item>
    <item>
      <title>Re: Extract multivalue data to dynamic fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-multivalue-data-to-dynamic-fields/m-p/646607#M223814</link>
      <description>&lt;P&gt;After some more searching I stumbled on&amp;nbsp;mvexpand and had to add it to expand the temp field like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults 
| eval DICOMQuery="(0008,0052) Query/Retrieve Level [SERIES] | (0010,0020) Patient ID [1234567] | (0020,000D) Study Instance UID [1.2.34.567890.12.3456.789.123456.7.20230501130047.4915859] | (0020,000E) Series Instance UID [1.2.345.678.90.1.23456789012.34567890.20230508110959]"
| eval temp=split(DICOMQuery,"|") 
| mvexpand temp
| rex field=temp "(?&amp;lt;DICOMGroup&amp;gt;([\dA-Fa-f]{4})),\d?(?&amp;lt;DICOMElement&amp;gt;([\dA-Fa-f]{4}))\)\s+(?&amp;lt;DICOMLabel&amp;gt;[^\[]+)\s\[(?&amp;lt;DICOMValue&amp;gt;[^\]]+)\]"
| eval {DICOMLabel}=DICOMValue
| fields - DICOMQuery DICOMLabel, DICOMValue temp&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 12 Jun 2023 09:50:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-multivalue-data-to-dynamic-fields/m-p/646607#M223814</guid>
      <dc:creator>jmartens</dc:creator>
      <dc:date>2023-06-12T09:50:33Z</dc:date>
    </item>
  </channel>
</rss>

