<?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: Nested case -&amp;gt; match within mvjoin in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Nested-case-gt-match-within-mvjoin/m-p/494339#M137823</link>
    <description>&lt;P&gt;You should at least &lt;CODE&gt;UpVote&lt;/CODE&gt; @richgalloway because he lead  you directly to the answer.&lt;/P&gt;</description>
    <pubDate>Wed, 09 Oct 2019 14:06:25 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2019-10-09T14:06:25Z</dc:date>
    <item>
      <title>Nested case -&gt; match within mvjoin</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Nested-case-gt-match-within-mvjoin/m-p/494335#M137819</link>
      <description>&lt;P&gt;Hello, I'm trying to create an multi-value field 'category' which takes its value from a 'case(match(' that queries a users AD group membership and returns the category value based on the memberOf field; see below.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | eval category=mvjoin(case(match(memberOf, "(?i)^.*?CN\={employee AD group}\,?.+"),"employee",match(memberOf, "(?i)^.*?CN\={domain admins AD group}\,?.+"),"privileged",match(memberOf, "(?i)^.*?CN\={restricted internet AD group}\,?.+"),"rest_int"), "|")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;For some reason though the final 'category' field only ever contains one value, despite some users being in more than one of the AD groups. mvappend doesn't work either.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Oct 2019 10:58:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Nested-case-gt-match-within-mvjoin/m-p/494335#M137819</guid>
      <dc:creator>Dworsnop</dc:creator>
      <dc:date>2019-10-09T10:58:55Z</dc:date>
    </item>
    <item>
      <title>Re: Nested case -&gt; match within mvjoin</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Nested-case-gt-match-within-mvjoin/m-p/494336#M137820</link>
      <description>&lt;P&gt;The &lt;CODE&gt;case&lt;/CODE&gt; command only matches once so there will only be a single value to pass to &lt;CODE&gt;mvjoin&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Oct 2019 12:33:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Nested-case-gt-match-within-mvjoin/m-p/494336#M137820</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2019-10-09T12:33:35Z</dc:date>
    </item>
    <item>
      <title>Re: Nested case -&gt; match within mvjoin</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Nested-case-gt-match-within-mvjoin/m-p/494337#M137821</link>
      <description>&lt;P&gt;Ah okay, thanks.&lt;/P&gt;

&lt;P&gt;Any suggestions on how I can accomplish my goal?&lt;/P&gt;</description>
      <pubDate>Wed, 09 Oct 2019 12:53:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Nested-case-gt-match-within-mvjoin/m-p/494337#M137821</guid>
      <dc:creator>Dworsnop</dc:creator>
      <dc:date>2019-10-09T12:53:20Z</dc:date>
    </item>
    <item>
      <title>Re: Nested case -&gt; match within mvjoin</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Nested-case-gt-match-within-mvjoin/m-p/494338#M137822</link>
      <description>&lt;P&gt;Not to worry folks, I just did it this way...&lt;/P&gt;

&lt;P&gt;| eval cat1=case(match(memberOf, "(?i)^.&lt;EM&gt;?CN={employee AD group}\,?.+"),"employee") &lt;BR /&gt;
| eval cat2=case(match(memberOf, "(?i)^.&lt;/EM&gt;?CN={domain admins AD group}\,?.+"),"privileged") &lt;BR /&gt;
| eval cat3=case(match(memberOf, "(?i)^.*?CN={restricted internet AD group}\,?.+"),"rest_int") &lt;BR /&gt;
| eval category=mvappend(cat1,cat2,cat3) &lt;/P&gt;

&lt;P&gt;A bit more convoluted than I'd hoped but it works.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Oct 2019 13:50:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Nested-case-gt-match-within-mvjoin/m-p/494338#M137822</guid>
      <dc:creator>Dworsnop</dc:creator>
      <dc:date>2019-10-09T13:50:35Z</dc:date>
    </item>
    <item>
      <title>Re: Nested case -&gt; match within mvjoin</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Nested-case-gt-match-within-mvjoin/m-p/494339#M137823</link>
      <description>&lt;P&gt;You should at least &lt;CODE&gt;UpVote&lt;/CODE&gt; @richgalloway because he lead  you directly to the answer.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Oct 2019 14:06:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Nested-case-gt-match-within-mvjoin/m-p/494339#M137823</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-10-09T14:06:25Z</dc:date>
    </item>
  </channel>
</rss>

