<?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: Remove field values from one multi-valued field which values are present in another multi-valued field in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Remove-field-values-from-one-multi-valued-field-which-values-are/m-p/604514#M210274</link>
    <description>&lt;P&gt;If I'm not mistaken,&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/MultivalueEvalFunctions#mvfilter.28X.29" target="_blank" rel="noopener"&gt;mvfilter()&lt;/A&gt;&amp;nbsp;does just that. &amp;nbsp;You can use&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/MultivalueEvalFunctions#mvmap.28X.2CY.29" target="_blank" rel="noopener"&gt;mvmap()&lt;/A&gt;&amp;nbsp;to iterate over email_sender.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval dest=mvmap(email_sender, mvfilter(isnull(mvfind(dest, "^" . email_sender . "$"))))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;The &lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/MultivalueEvalFunctions#mvfind.28MVFIELD.2C.22REGEX.22.29" target="_blank" rel="noopener"&gt;mvfind()&lt;/A&gt; expression assumes that each email_sender would match the exact spelling if it appears in dest.&lt;/P&gt;</description>
    <pubDate>Wed, 06 Jul 2022 02:25:40 GMT</pubDate>
    <dc:creator>yuanliu</dc:creator>
    <dc:date>2022-07-06T02:25:40Z</dc:date>
    <item>
      <title>Remove field values from one multi-valued field which values are present in another multi-valued field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Remove-field-values-from-one-multi-valued-field-which-values-are/m-p/604432#M210242</link>
      <description>&lt;P&gt;Remove field values from one multi-valued field which values are present in another multi-valued field&lt;/P&gt;&lt;P&gt;Looking for something like:&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;| eval dest=mvfilter(if(dest IN email_sender, null(), dest))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here dest contains both sender and receiver of the email. hence I'm trying to exclude the sender from it.&lt;/P&gt;&lt;P&gt;(FYI, the sender is also a multi-valued field that's because I've used stats before it.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jul 2022 11:44:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Remove-field-values-from-one-multi-valued-field-which-values-are/m-p/604432#M210242</guid>
      <dc:creator>VatsalJagani</dc:creator>
      <dc:date>2022-07-05T11:44:36Z</dc:date>
    </item>
    <item>
      <title>Re: Remove field values from one multi-valued field which values are present in another multi-valued field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Remove-field-values-from-one-multi-valued-field-which-values-are/m-p/604513#M210273</link>
      <description>&lt;P&gt;Use mvmap. See this example&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults count=1
| eval dest=split("User1,User2,User3,User4,User5",",")
| eval sender=split("User3,User7", ",")
| table sender dest
| eval dest=mvmap(dest,if(isnull(mvfind(sender,dest)),dest,null))&lt;/LI-CODE&gt;&lt;P&gt;last line removes 'User3' from the dest field as it's one of the senders.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jul 2022 02:20:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Remove-field-values-from-one-multi-valued-field-which-values-are/m-p/604513#M210273</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2022-07-06T02:20:44Z</dc:date>
    </item>
    <item>
      <title>Re: Remove field values from one multi-valued field which values are present in another multi-valued field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Remove-field-values-from-one-multi-valued-field-which-values-are/m-p/604514#M210274</link>
      <description>&lt;P&gt;If I'm not mistaken,&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/MultivalueEvalFunctions#mvfilter.28X.29" target="_blank" rel="noopener"&gt;mvfilter()&lt;/A&gt;&amp;nbsp;does just that. &amp;nbsp;You can use&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/MultivalueEvalFunctions#mvmap.28X.2CY.29" target="_blank" rel="noopener"&gt;mvmap()&lt;/A&gt;&amp;nbsp;to iterate over email_sender.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval dest=mvmap(email_sender, mvfilter(isnull(mvfind(dest, "^" . email_sender . "$"))))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;The &lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/MultivalueEvalFunctions#mvfind.28MVFIELD.2C.22REGEX.22.29" target="_blank" rel="noopener"&gt;mvfind()&lt;/A&gt; expression assumes that each email_sender would match the exact spelling if it appears in dest.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jul 2022 02:25:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Remove-field-values-from-one-multi-valued-field-which-values-are/m-p/604514#M210274</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2022-07-06T02:25:40Z</dc:date>
    </item>
    <item>
      <title>Re: Remove field values from one multi-valued field which values are present in another multi-valued field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Remove-field-values-from-one-multi-valued-field-which-values-are/m-p/604535#M210278</link>
      <description>&lt;P&gt;Thanks &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/33901"&gt;@yuanliu&lt;/a&gt;.&amp;nbsp;Logically I thought this should work but somehow mvfilter doesn't want to work. Anyways it worked with&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/6367"&gt;@bowesmana&lt;/a&gt;&amp;nbsp;answer without mvfilter.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VatsalJagani_0-1657089389258.png" style="width: 803px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/20409i29A6F98FE442CF27/image-dimensions/803x259?v=v2" width="803" height="259" role="button" title="VatsalJagani_0-1657089389258.png" alt="VatsalJagani_0-1657089389258.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jul 2022 06:37:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Remove-field-values-from-one-multi-valued-field-which-values-are/m-p/604535#M210278</guid>
      <dc:creator>VatsalJagani</dc:creator>
      <dc:date>2022-07-06T06:37:57Z</dc:date>
    </item>
    <item>
      <title>Re: Remove field values from one multi-valued field which values are present in another multi-valued field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Remove-field-values-from-one-multi-valued-field-which-values-are/m-p/604691#M210313</link>
      <description>&lt;P&gt;I think I know why mvfilter gives error. &amp;nbsp;mvfilter requires its argument to only involve one multivalue variable. &amp;nbsp;But because of mvfind, it now involves both dest and email_sender, even though email_sender is actually single-valued inside the mvmap iterator. &amp;nbsp;In fact, mvfilter will parse to error even if email_sender is genuinely single valued.&lt;/P&gt;&lt;P&gt;There might be some roundabout way to turn email_sender into a pattern substitution instead of a variable, but that is in itself too convoluted.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jul 2022 02:55:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Remove-field-values-from-one-multi-valued-field-which-values-are/m-p/604691#M210313</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2022-07-07T02:55:29Z</dc:date>
    </item>
    <item>
      <title>Re: Remove field values from one multi-valued field which values are present in another multi-valued field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Remove-field-values-from-one-multi-valued-field-which-values-are/m-p/604692#M210314</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/33901"&gt;@yuanliu&lt;/a&gt;&amp;nbsp;- Yeah, &lt;STRONG&gt;mvfilter&lt;/STRONG&gt; can reference only one field, the rest should be only string/pattens.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;The expression can reference only one field.&lt;/LI-CODE&gt;&lt;P&gt;(From doc -&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/SCS/current/SearchReference/MultivalueEvalFunctions" target="_blank"&gt;https://docs.splunk.com/Documentation/SCS/current/SearchReference/MultivalueEvalFunctions&lt;/A&gt;)&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jul 2022 04:56:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Remove-field-values-from-one-multi-valued-field-which-values-are/m-p/604692#M210314</guid>
      <dc:creator>VatsalJagani</dc:creator>
      <dc:date>2022-07-07T04:56:57Z</dc:date>
    </item>
  </channel>
</rss>

