<?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 Comparision shows no matches despite both fields having same values in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Eval-Comparision-shows-no-matches-despite-both-fields-having/m-p/591405#M205879</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/229059"&gt;@neerajs_81&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;I suppose that you already checked if there's a space at the beginning or the eand of both values.&lt;/P&gt;&lt;P&gt;Anyway, please rename the field with dot and try again:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=xxx sourcetype=xxxx 
....
| rename actor.alternateId AS alternateId
| eval match=if(alternateId=src_user_email,"Match","No Match")&lt;/LI-CODE&gt;&lt;P&gt;sometimes dot gives problem in eval command.&lt;/P&gt;&lt;P&gt;Ciao.,&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
    <pubDate>Wed, 30 Mar 2022 06:38:31 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2022-03-30T06:38:31Z</dc:date>
    <item>
      <title>Eval Comparision shows no matches despite both fields having same values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Eval-Comparision-shows-no-matches-despite-both-fields-having/m-p/591400#M205875</link>
      <description>&lt;P&gt;Hi All,&amp;nbsp;&lt;BR /&gt;I need to filter my search based on the condition if the values of 2 fields are equal or not.&amp;nbsp; The 2 fields in question are actor.alernateID&amp;nbsp; and src_user_email and both fields are visible in the same event.&lt;BR /&gt;&lt;BR /&gt;For example:&amp;nbsp; Raw data shows value of &lt;STRONG&gt;actor.alternateID&lt;/STRONG&gt; is&amp;nbsp; &lt;STRONG&gt;&amp;nbsp;anand.pandey@company.com&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="neerajs_81_0-1648619765791.png" style="width: 555px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/18834i1A1396217B4448E4/image-dimensions/555x274?v=v2" width="555" height="274" role="button" title="neerajs_81_0-1648619765791.png" alt="neerajs_81_0-1648619765791.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Likewise, Raw data shows value or &lt;STRONG&gt;src_user_email&lt;/STRONG&gt; is also same:&amp;nbsp; &lt;STRONG&gt;&lt;A href="mailto:anand.pandey@company.com" target="_blank" rel="noopener"&gt;anand.pandey@company.com&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="neerajs_81_1-1648619923583.png" style="width: 576px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/18835i5F014075FCC6710C/image-dimensions/576x163?v=v2" width="576" height="163" role="button" title="neerajs_81_1-1648619923583.png" alt="neerajs_81_1-1648619923583.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If i run the following search,&amp;nbsp; the value of the field &lt;STRONG&gt;match&amp;nbsp;&lt;/STRONG&gt; comes out to be &lt;STRONG&gt;"No match"&lt;/STRONG&gt;&amp;nbsp;.&amp;nbsp; Why is eval showing them to be not a match if both field values are the same ?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&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;index=xxx sourcetype=xxxx 
....
| eval match=if(actor.alternateId=src_user_email,"Match","No Match")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="neerajs_81_3-1648620163158.png" style="width: 605px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/18839iA39974C55A634BE3/image-dimensions/605x214?v=v2" width="605" height="214" role="button" title="neerajs_81_3-1648620163158.png" alt="neerajs_81_3-1648620163158.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Likewise, instead&amp;nbsp; if i&amp;nbsp; use the where condition instead of eval&amp;nbsp; ,&amp;nbsp; this shows NO results to display;&amp;nbsp; &amp;nbsp;meaning&amp;nbsp; even the where clause thinks both fields are different .&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&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;|where src_user_email = actor.alternateID&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The same is happening for other email IDs and other fields even though their values are same.&lt;/P&gt;&lt;P&gt;What am i doing wrong here?&amp;nbsp;How to compare fields then?&amp;nbsp; Both are strings.&lt;STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Mar 2022 06:08:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Eval-Comparision-shows-no-matches-despite-both-fields-having/m-p/591400#M205875</guid>
      <dc:creator>neerajs_81</dc:creator>
      <dc:date>2022-03-30T06:08:42Z</dc:date>
    </item>
    <item>
      <title>Re: Eval Comparision shows no matches despite both fields having same values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Eval-Comparision-shows-no-matches-despite-both-fields-having/m-p/591405#M205879</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/229059"&gt;@neerajs_81&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;I suppose that you already checked if there's a space at the beginning or the eand of both values.&lt;/P&gt;&lt;P&gt;Anyway, please rename the field with dot and try again:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=xxx sourcetype=xxxx 
....
| rename actor.alternateId AS alternateId
| eval match=if(alternateId=src_user_email,"Match","No Match")&lt;/LI-CODE&gt;&lt;P&gt;sometimes dot gives problem in eval command.&lt;/P&gt;&lt;P&gt;Ciao.,&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 30 Mar 2022 06:38:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Eval-Comparision-shows-no-matches-despite-both-fields-having/m-p/591405#M205879</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-03-30T06:38:31Z</dc:date>
    </item>
    <item>
      <title>Re: Eval Comparision shows no matches despite both fields having same values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Eval-Comparision-shows-no-matches-despite-both-fields-having/m-p/591409#M205883</link>
      <description>&lt;P class="lia-align-left"&gt;Holly Molly &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp; Just when i was going thru your other post , you replied to my question.&lt;BR /&gt;&lt;A href="https://community.splunk.com/t5/Splunk-Search/comparing-fields-to-find-identical-values/m-p/533089" target="_blank"&gt;https://community.splunk.com/t5/Splunk-Search/comparing-fields-to-find-identical-values/m-p/533089&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="lia-align-left"&gt;Thank you so much that worked.&amp;nbsp;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Now is the . dot in the field name&amp;nbsp; an issue with&amp;nbsp; |&lt;STRONG&gt;search&lt;/STRONG&gt;&amp;nbsp; and &lt;STRONG&gt;|where&amp;nbsp; &lt;/STRONG&gt;clause&amp;nbsp; also ?&amp;nbsp; Because i did try comparing using both search and where&amp;nbsp; in additional to eval&amp;nbsp; as you mentioned in the other post and both didn't work.&amp;nbsp; Do i need to &lt;STRONG&gt;rename &lt;/STRONG&gt;the field if comparing via&amp;nbsp; |search and |where as well ?&lt;/P&gt;</description>
      <pubDate>Wed, 30 Mar 2022 06:56:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Eval-Comparision-shows-no-matches-despite-both-fields-having/m-p/591409#M205883</guid>
      <dc:creator>neerajs_81</dc:creator>
      <dc:date>2022-03-30T06:56:38Z</dc:date>
    </item>
    <item>
      <title>Re: Eval Comparision shows no matches despite both fields having same values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Eval-Comparision-shows-no-matches-despite-both-fields-having/m-p/591415#M205887</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/229059"&gt;@neerajs_81&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;I'm not sure about all the situations where dot gives problem, I'm sure about eval!&lt;/P&gt;&lt;P&gt;But anyway, I always rename eventual fields with dot or parenthesis or spaces or other strange chars.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 30 Mar 2022 07:10:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Eval-Comparision-shows-no-matches-despite-both-fields-having/m-p/591415#M205887</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-03-30T07:10:06Z</dc:date>
    </item>
  </channel>
</rss>

