<?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: Compare a field with a single string against a Multi Field String in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Compare-a-field-with-a-single-string-against-a-Multi-Field/m-p/560557#M159307</link>
    <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/33154"&gt;@JRamirezEnosys&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Correction in your search.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval Logged_before_from_ASN=if(split(m_asn," ")=asn, "YES", "NO")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;My Sample Search :&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults 
| eval m_asn="A1234 A2345 A3456" , asn="A1234"
| eval Logged_before_from_ASN=if(split(m_asn," ")=asn, "YES", "NO")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;BR /&gt;KV&lt;BR /&gt;▄︻̷̿┻̿═━一 &amp;nbsp; ?&lt;BR /&gt;&lt;BR /&gt;If any of my reply helps you to solve the problem Or gain knowledge, an upvote would be appreciated.&lt;/P&gt;</description>
    <pubDate>Fri, 23 Jul 2021 04:58:08 GMT</pubDate>
    <dc:creator>kamlesh_vaghela</dc:creator>
    <dc:date>2021-07-23T04:58:08Z</dc:date>
    <item>
      <title>Compare a field with a single string against a Multi Field String</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compare-a-field-with-a-single-string-against-a-Multi-Field/m-p/560541#M159298</link>
      <description>&lt;P&gt;My use case is the following, I have login information regarding which ASN a user logged in today on the field &lt;STRONG&gt;ASN&lt;/STRONG&gt; and data from the authentication datamodel, which gives me a "list" of ASNs&amp;nbsp;&amp;nbsp;"values(ASN)" AS &lt;STRONG&gt;Multi_ASN&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;I was trying to use an eval to get a YES or NO answer, if the user have login from these ASNs. There was a lot of pain trying to get the command correct, but I ended up using this eval for this type of data&lt;BR /&gt;&lt;BR /&gt;ASN = A1234&lt;BR /&gt;Multi_ASN = A1234 A2345 A3456&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 Logged_before_from_ASN=if(IN(ASN, (split(Multi_ASN," "))) , "YES", "NO") &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So the split divides the values in Multi_ASN and that is compared by the "&lt;STRONG&gt;if(IN(&lt;/STRONG&gt;" but unfortunately there is no highlighting for "&lt;STRONG&gt;IN&lt;/STRONG&gt;"&lt;BR /&gt;&lt;BR /&gt;Any recommendations?&lt;BR /&gt;&lt;BR /&gt;This eval is working but I wonder if there is a better way to do this&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jul 2021 00:55:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compare-a-field-with-a-single-string-against-a-Multi-Field/m-p/560541#M159298</guid>
      <dc:creator>JRamirezEnosys</dc:creator>
      <dc:date>2021-07-23T00:55:33Z</dc:date>
    </item>
    <item>
      <title>Re: Compare a field with a single string against a Multi Field String</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compare-a-field-with-a-single-string-against-a-Multi-Field/m-p/560543#M159299</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/33154"&gt;@JRamirezEnosys&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you try this, this works.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults 
| eval m_asn="A1234 A2345 A3456" , asn="A1234"
| makemv delim=" " m_asn 
| eval result=if(asn == m_asn, "YES", "NO")&lt;/LI-CODE&gt;&lt;P&gt;---&lt;/P&gt;&lt;P&gt;An upvote would be appreciated and Accept solution if this reply helps!&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jul 2021 01:47:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compare-a-field-with-a-single-string-against-a-Multi-Field/m-p/560543#M159299</guid>
      <dc:creator>venkatasri</dc:creator>
      <dc:date>2021-07-23T01:47:32Z</dc:date>
    </item>
    <item>
      <title>Re: Compare a field with a single string against a Multi Field String</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compare-a-field-with-a-single-string-against-a-Multi-Field/m-p/560557#M159307</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/33154"&gt;@JRamirezEnosys&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Correction in your search.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval Logged_before_from_ASN=if(split(m_asn," ")=asn, "YES", "NO")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;My Sample Search :&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults 
| eval m_asn="A1234 A2345 A3456" , asn="A1234"
| eval Logged_before_from_ASN=if(split(m_asn," ")=asn, "YES", "NO")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;BR /&gt;KV&lt;BR /&gt;▄︻̷̿┻̿═━一 &amp;nbsp; ?&lt;BR /&gt;&lt;BR /&gt;If any of my reply helps you to solve the problem Or gain knowledge, an upvote would be appreciated.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jul 2021 04:58:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compare-a-field-with-a-single-string-against-a-Multi-Field/m-p/560557#M159307</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2021-07-23T04:58:08Z</dc:date>
    </item>
  </channel>
</rss>

