<?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: Can you help me with an eval that has conditions? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-an-eval-that-has-conditions/m-p/419911#M174266</link>
    <description>&lt;P&gt;hi&lt;BR /&gt;
with your code when In change the token time i have two lines with Yes and No.....&lt;/P&gt;</description>
    <pubDate>Thu, 06 Dec 2018 08:21:53 GMT</pubDate>
    <dc:creator>jip31</dc:creator>
    <dc:date>2018-12-06T08:21:53Z</dc:date>
    <item>
      <title>Can you help me with an eval that has conditions?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-an-eval-that-has-conditions/m-p/419906#M174261</link>
      <description>&lt;P&gt;hello,&lt;/P&gt;

&lt;P&gt;I use the code below in order to test if a filename exists.&lt;/P&gt;

&lt;P&gt;It works, but only when I put the token time on "all time".&lt;/P&gt;

&lt;P&gt;When I put a short token time like "last hour", there is no "Yes" or "No" but "Any results" message&lt;/P&gt;

&lt;P&gt;When there is "Any results", I want to display "No".&lt;/P&gt;

&lt;P&gt;Could you help me please??&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="ai-wkst-windows-fr" sourcetype="tools:flags" filename="ACV-TOUPDATE.$w$*" 
| dedup host 
| eval filename=if(filename=="ACV-TOUPDATE.$w$", "YES", "NO") 
| table filename
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 05 Dec 2018 06:50:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-an-eval-that-has-conditions/m-p/419906#M174261</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2018-12-05T06:50:09Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me with an eval that has conditions?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-an-eval-that-has-conditions/m-p/419907#M174262</link>
      <description>&lt;P&gt;what is "any results", do you mean "no results found try expanding time range"&lt;/P&gt;

&lt;P&gt;Try this&lt;/P&gt;

&lt;P&gt;index="ai-wkst-windows-fr" sourcetype="tools:flags" filename=*&lt;BR /&gt;
 | dedup host &lt;BR /&gt;
 | eval filename=if(filename=="ACV-TOUPDATE.$w$", "YES", "NO") &lt;BR /&gt;
 | table filename&lt;/P&gt;</description>
      <pubDate>Wed, 05 Dec 2018 07:00:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-an-eval-that-has-conditions/m-p/419907#M174262</guid>
      <dc:creator>nagarjuna280</dc:creator>
      <dc:date>2018-12-05T07:00:16Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me with an eval that has conditions?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-an-eval-that-has-conditions/m-p/419908#M174263</link>
      <description>&lt;P&gt;Yes i mean "no results found try expanding time range"&lt;BR /&gt;
you code dont works because with it I have always "No"&lt;/P&gt;</description>
      <pubDate>Wed, 05 Dec 2018 07:33:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-an-eval-that-has-conditions/m-p/419908#M174263</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2018-12-05T07:33:37Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me with an eval that has conditions?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-an-eval-that-has-conditions/m-p/419909#M174264</link>
      <description>&lt;P&gt;hi @jip31&lt;/P&gt;

&lt;P&gt;can u try like this &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;   index="ai-wkst-windows-fr" sourcetype="tools:flags" filename="ACV-TOUPDATE.$w$*" 
     | dedup host 
    |eval token="ACV-TOUPDATE.$w$"
     | eval filename=if(filename==token, "YES", "NO") 
     | table filename
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 05 Dec 2018 11:54:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-an-eval-that-has-conditions/m-p/419909#M174264</guid>
      <dc:creator>harishalipaka</dc:creator>
      <dc:date>2018-12-05T11:54:19Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me with an eval that has conditions?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-an-eval-that-has-conditions/m-p/419910#M174265</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Can you try the below search.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index="ai-wkst-windows-fr" sourcetype="tools:flags" filename="ACV-TOUPDATE.$w$*" 
 | dedup host 
 | append [|makeresults | eval filename = "Not Defined" | table filename]
 | eval filename=if(filename=="ACV-TOUPDATE.$w$", "YES", "NO") 
| head 1
 | table filename
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 06 Dec 2018 06:42:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-an-eval-that-has-conditions/m-p/419910#M174265</guid>
      <dc:creator>sdchakraborty</dc:creator>
      <dc:date>2018-12-06T06:42:25Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me with an eval that has conditions?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-an-eval-that-has-conditions/m-p/419911#M174266</link>
      <description>&lt;P&gt;hi&lt;BR /&gt;
with your code when In change the token time i have two lines with Yes and No.....&lt;/P&gt;</description>
      <pubDate>Thu, 06 Dec 2018 08:21:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-an-eval-that-has-conditions/m-p/419911#M174266</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2018-12-06T08:21:53Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me with an eval that has conditions?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-an-eval-that-has-conditions/m-p/419912#M174267</link>
      <description>&lt;P&gt;Sorry missed one code, please try the below one,&lt;BR /&gt;
&lt;CODE&gt;index="ai-wkst-windows-fr" sourcetype="tools:flags" filename="ACV-TOUPDATE.$w$*" &lt;BR /&gt;
  | dedup host &lt;BR /&gt;
  | append [|makeresults | eval filename = "Not Defined" | table filename]&lt;BR /&gt;
  | eval filename=if(filename=="ACV-TOUPDATE.$w$", "YES", "NO") &lt;BR /&gt;
  | head 1&lt;BR /&gt;
  | table filename&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Dec 2018 11:20:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-an-eval-that-has-conditions/m-p/419912#M174267</guid>
      <dc:creator>sdchakraborty</dc:creator>
      <dc:date>2018-12-06T11:20:52Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me with an eval that has conditions?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-an-eval-that-has-conditions/m-p/419913#M174268</link>
      <description>&lt;P&gt;Perfect thanks&lt;/P&gt;</description>
      <pubDate>Thu, 06 Dec 2018 12:04:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-an-eval-that-has-conditions/m-p/419913#M174268</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2018-12-06T12:04:39Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me with an eval that has conditions?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-an-eval-that-has-conditions/m-p/419914#M174269</link>
      <description>&lt;P&gt;Cool....I edited my main answer as well&lt;/P&gt;</description>
      <pubDate>Thu, 06 Dec 2018 13:14:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-an-eval-that-has-conditions/m-p/419914#M174269</guid>
      <dc:creator>sdchakraborty</dc:creator>
      <dc:date>2018-12-06T13:14:48Z</dc:date>
    </item>
  </channel>
</rss>

