<?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 Eval expression field not working in data model. in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Eval-expression-field-not-working-in-data-model/m-p/479912#M134510</link>
    <description>&lt;P&gt;Here is my attempt to create a new field eval in datamodels (no results):&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/8732i767DDEA602763C32/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Here is the same data, just not using the datamodel:&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/8733i21D3445F11F2059F/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 23 Apr 2020 17:47:38 GMT</pubDate>
    <dc:creator>wgawhh5hbnht</dc:creator>
    <dc:date>2020-04-23T17:47:38Z</dc:date>
    <item>
      <title>Eval expression field not working in data model.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Eval-expression-field-not-working-in-data-model/m-p/479912#M134510</link>
      <description>&lt;P&gt;Here is my attempt to create a new field eval in datamodels (no results):&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/8732i767DDEA602763C32/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Here is the same data, just not using the datamodel:&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/8733i21D3445F11F2059F/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Apr 2020 17:47:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Eval-expression-field-not-working-in-data-model/m-p/479912#M134510</guid>
      <dc:creator>wgawhh5hbnht</dc:creator>
      <dc:date>2020-04-23T17:47:38Z</dc:date>
    </item>
    <item>
      <title>Re: Eval expression field not working in data model.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Eval-expression-field-not-working-in-data-model/m-p/479913#M134511</link>
      <description>&lt;P&gt;If you change the datamodel field to &lt;CODE&gt;case(action=="Failed Log In", "Failure", action=="Log In", "Success", 1==1, action)&lt;/CODE&gt; what do you get?&lt;/P&gt;</description>
      <pubDate>Thu, 23 Apr 2020 18:24:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Eval-expression-field-not-working-in-data-model/m-p/479913#M134511</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-04-23T18:24:27Z</dc:date>
    </item>
    <item>
      <title>Re: Eval expression field not working in data model.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Eval-expression-field-not-working-in-data-model/m-p/479914#M134512</link>
      <description>&lt;P&gt;an error message:&lt;BR /&gt;
Error in 'eval' command: The arguments to the 'case' function are invalid.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Apr 2020 18:35:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Eval-expression-field-not-working-in-data-model/m-p/479914#M134512</guid>
      <dc:creator>wgawhh5hbnht</dc:creator>
      <dc:date>2020-04-23T18:35:49Z</dc:date>
    </item>
    <item>
      <title>Re: Eval expression field not working in data model.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Eval-expression-field-not-working-in-data-model/m-p/479915#M134513</link>
      <description>&lt;P&gt;oops.  I corrected my answer.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Apr 2020 18:45:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Eval-expression-field-not-working-in-data-model/m-p/479915#M134513</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-04-23T18:45:12Z</dc:date>
    </item>
    <item>
      <title>Re: Eval expression field not working in data model.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Eval-expression-field-not-working-in-data-model/m-p/479916#M134514</link>
      <description>&lt;P&gt;while this did get me closer, in that it provided both the Success &amp;amp; Failure, it unfortunately gave all the other actions too, which is exactly what I'm attempting to avoid.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Values  Count   %
Decrypt 143864  82.951
Encrypt 27243   15.708
VPN Routing 2082    1.200
Key Install 186 0.107
Drop    23  0.013
Reject  18  0.010
Success 12  0.007
Log Out 3   0.002
Allow   1   0.001
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Any idea why putting essentially a true clause at the end makes the Success &amp;amp; Failure case work? Any way to get this to work without obtaining all the other action results?&lt;/P&gt;</description>
      <pubDate>Thu, 23 Apr 2020 19:29:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Eval-expression-field-not-working-in-data-model/m-p/479916#M134514</guid>
      <dc:creator>wgawhh5hbnht</dc:creator>
      <dc:date>2020-04-23T19:29:00Z</dc:date>
    </item>
    <item>
      <title>Re: Eval expression field not working in data model.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Eval-expression-field-not-working-in-data-model/m-p/479917#M134515</link>
      <description>&lt;P&gt;The idea behind the default clause is to determine if the other expressions are working.  Your results make me think they are not since everything appears to falling into the last category.  A better way to verify this is with &lt;CODE&gt;case(action=="Failed Log In", "Failure", action=="Log In", "Success", 1==1, "unknown - " . action)&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Apr 2020 19:50:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Eval-expression-field-not-working-in-data-model/m-p/479917#M134515</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-04-23T19:50:44Z</dc:date>
    </item>
    <item>
      <title>Re: Eval expression field not working in data model.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Eval-expression-field-not-working-in-data-model/m-p/479918#M134516</link>
      <description>&lt;P&gt;It did create the "Success" &amp;amp; "Failure".&lt;/P&gt;

&lt;P&gt;If I run your new query, this is the results:&lt;BR /&gt;
    Values  Count   %&lt;BR /&gt;
    unknown - Decrypt   118137  79.418&lt;BR /&gt;
    unknown - Encrypt   28543   19.188&lt;BR /&gt;
    unknown - VPN Routing   1859    1.250&lt;BR /&gt;
    unknown - Key Install   80  0.054&lt;BR /&gt;
    unknown - Reject    74  0.050&lt;BR /&gt;
    unknown - Drop  31  0.021&lt;BR /&gt;
    Success 24  0.016&lt;BR /&gt;
    unknown - Log Out   6   0.004&lt;/P&gt;

&lt;P&gt;(I searched separately and there weren't any failed log ins during this time period)&lt;/P&gt;</description>
      <pubDate>Thu, 23 Apr 2020 20:51:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Eval-expression-field-not-working-in-data-model/m-p/479918#M134516</guid>
      <dc:creator>wgawhh5hbnht</dc:creator>
      <dc:date>2020-04-23T20:51:48Z</dc:date>
    </item>
    <item>
      <title>Re: Eval expression field not working in data model.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Eval-expression-field-not-working-in-data-model/m-p/479919#M134517</link>
      <description>&lt;P&gt;So it appears as though your original SPL should have worked.  I can't explain why you get results with a default clause and not without it.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Apr 2020 14:01:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Eval-expression-field-not-working-in-data-model/m-p/479919#M134517</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-04-24T14:01:00Z</dc:date>
    </item>
  </channel>
</rss>

