<?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 against a lookup in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Eval-against-a-lookup/m-p/584894#M203753</link>
    <description>&lt;P&gt;Thanks! that works&lt;/P&gt;</description>
    <pubDate>Mon, 14 Feb 2022 03:44:11 GMT</pubDate>
    <dc:creator>Tika</dc:creator>
    <dc:date>2022-02-14T03:44:11Z</dc:date>
    <item>
      <title>Eval against a lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Eval-against-a-lookup/m-p/584887#M203750</link>
      <description>&lt;P&gt;Hello, I am new to Splunk and this is probably a basic query.&amp;nbsp;I have a field with an email address and I want to check if the email exists in a look up table and eval it to 1, if found and 0 if not.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also have multiple emails in the field and this is what I have come up with so far, any help is much appreciated.&lt;/P&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;LI-CODE lang="markup"&gt;| rename "my_user.user_email" as email | mvexpand email | stats count by email  | eval useremail= email."@my_domain.com" | table useremail count | lookup userdomain_email email as useremail OUTPUT user as user &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;But this gives me counts and Im not sure if the result is accurate either. &amp;nbsp;Thanks!&lt;/P&gt;</description>
      <pubDate>Sun, 13 Feb 2022 22:54:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Eval-against-a-lookup/m-p/584887#M203750</guid>
      <dc:creator>Tika</dc:creator>
      <dc:date>2022-02-13T22:54:34Z</dc:date>
    </item>
    <item>
      <title>Re: Eval against a lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Eval-against-a-lookup/m-p/584892#M203751</link>
      <description>&lt;P&gt;There is only one step from your lookup output to 0-or-1 determination:&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/ConditionalFunctions#if.28X.2CY.2CZ.29" target="_self"&gt;if(X,Y,Z)&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Feb 2022 03:39:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Eval-against-a-lookup/m-p/584892#M203751</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2022-02-14T03:39:43Z</dc:date>
    </item>
    <item>
      <title>Re: Eval against a lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Eval-against-a-lookup/m-p/584893#M203752</link>
      <description>&lt;P&gt;(Clicked Enter by mistake and for some reason I cannot edit or delete the above. &amp;nbsp;So here goes)&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval in_lookup = if(isnull(user), 0, 1)&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 14 Feb 2022 03:43:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Eval-against-a-lookup/m-p/584893#M203752</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2022-02-14T03:43:16Z</dc:date>
    </item>
    <item>
      <title>Re: Eval against a lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Eval-against-a-lookup/m-p/584894#M203753</link>
      <description>&lt;P&gt;Thanks! that works&lt;/P&gt;</description>
      <pubDate>Mon, 14 Feb 2022 03:44:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Eval-against-a-lookup/m-p/584894#M203753</guid>
      <dc:creator>Tika</dc:creator>
      <dc:date>2022-02-14T03:44:11Z</dc:date>
    </item>
    <item>
      <title>Re: Eval against a lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Eval-against-a-lookup/m-p/584920#M203764</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/243033"&gt;@Tika&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;you could run something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;your_search
| rename "my_user.user_email" as email 
| mvexpand email 
| stats count by email  
| eval useremail= email."@my_domain.com" 
| append [ | inputlookup userdomain_email | rename email AS useremail | fields useremail ]
| stats sum(count) AS total BY useremail
| eval status=if(total=0,0,1)
| table useremail status&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 14 Feb 2022 07:36:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Eval-against-a-lookup/m-p/584920#M203764</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-02-14T07:36:30Z</dc:date>
    </item>
  </channel>
</rss>

