<?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: Help require to define calculate field in Knowledge Management</title>
    <link>https://community.splunk.com/t5/Knowledge-Management/Help-require-to-define-calculate-field/m-p/447414#M3969</link>
    <description>&lt;P&gt;please go through the eval documentation here &lt;A href="https://docs.splunk.com/Documentation/Splunk/7.2.6/SearchReference/Eval"&gt;https://docs.splunk.com/Documentation/Splunk/7.2.6/SearchReference/Eval&lt;/A&gt; and here&lt;BR /&gt;
&lt;A href="https://docs.splunk.com/Documentation/Splunk/7.2.6/Search/Usetheevalcommandandfunctions"&gt;https://docs.splunk.com/Documentation/Splunk/7.2.6/Search/Usetheevalcommandandfunctions&lt;/A&gt;&lt;BR /&gt;
eval can be used with if, case just like other programming languages&lt;BR /&gt;
Your requirement is also not very clear, you say - when field securityService = Antimalware then new signature field equals to securityService  and you give an example in bold &lt;BR /&gt;
securityService = Antispam then signature field equals to securityService&lt;BR /&gt;
So when securityService = both Antispam or Antimalware your signature field should eval out to securityService?&lt;BR /&gt;
What is the difference when you are setting the securityService feild to the same value?&lt;/P&gt;</description>
    <pubDate>Sun, 05 May 2019 07:45:56 GMT</pubDate>
    <dc:creator>Sukisen1981</dc:creator>
    <dc:date>2019-05-05T07:45:56Z</dc:date>
    <item>
      <title>Help require to define calculate field</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Help-require-to-define-calculate-field/m-p/447413#M3968</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;

&lt;P&gt;I need to calculate field base on the below scenario. &lt;/P&gt;

&lt;P&gt;need to create a new field signature but when field securityService = Antimalware then  new signature field equals to securityService "&lt;EM&gt;"  malwareCategory  and if securityService = Antispam then signature field equals to securityService "&lt;/EM&gt;" verdict .  &lt;/P&gt;

&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Sun, 05 May 2019 07:30:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Help-require-to-define-calculate-field/m-p/447413#M3968</guid>
      <dc:creator>sumitkathpal</dc:creator>
      <dc:date>2019-05-05T07:30:54Z</dc:date>
    </item>
    <item>
      <title>Re: Help require to define calculate field</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Help-require-to-define-calculate-field/m-p/447414#M3969</link>
      <description>&lt;P&gt;please go through the eval documentation here &lt;A href="https://docs.splunk.com/Documentation/Splunk/7.2.6/SearchReference/Eval"&gt;https://docs.splunk.com/Documentation/Splunk/7.2.6/SearchReference/Eval&lt;/A&gt; and here&lt;BR /&gt;
&lt;A href="https://docs.splunk.com/Documentation/Splunk/7.2.6/Search/Usetheevalcommandandfunctions"&gt;https://docs.splunk.com/Documentation/Splunk/7.2.6/Search/Usetheevalcommandandfunctions&lt;/A&gt;&lt;BR /&gt;
eval can be used with if, case just like other programming languages&lt;BR /&gt;
Your requirement is also not very clear, you say - when field securityService = Antimalware then new signature field equals to securityService  and you give an example in bold &lt;BR /&gt;
securityService = Antispam then signature field equals to securityService&lt;BR /&gt;
So when securityService = both Antispam or Antimalware your signature field should eval out to securityService?&lt;BR /&gt;
What is the difference when you are setting the securityService feild to the same value?&lt;/P&gt;</description>
      <pubDate>Sun, 05 May 2019 07:45:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Help-require-to-define-calculate-field/m-p/447414#M3969</guid>
      <dc:creator>Sukisen1981</dc:creator>
      <dc:date>2019-05-05T07:45:56Z</dc:date>
    </item>
    <item>
      <title>Re: Help require to define calculate field</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Help-require-to-define-calculate-field/m-p/447415#M3970</link>
      <description>&lt;P&gt;Create a &lt;CODE&gt;Calculated Field&lt;/CODE&gt; called &lt;CODE&gt;signature&lt;/CODE&gt; defined like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;case(securityService == "Antimalware", securityService "_"  malwareCategory, securityService == "Antispam", securityService "_" verdict, true(), "BROKEN/FIXME")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 05 May 2019 23:09:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Help-require-to-define-calculate-field/m-p/447415#M3970</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-05-05T23:09:47Z</dc:date>
    </item>
    <item>
      <title>Re: Help require to define calculate field</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Help-require-to-define-calculate-field/m-p/447416#M3971</link>
      <description>&lt;P&gt;Thanks @woodcock but if we add three fields than it stops working &lt;/P&gt;

&lt;P&gt;case(securityService == "Antimalware", securityService + "&lt;EM&gt;" + malwareCategory, securityService == "Antispam", securityService + "&lt;/EM&gt;" + verdict, true(), "BROKEN/FIXME")    (This on is working under calculated field)&lt;/P&gt;

&lt;P&gt;case(securityService == "Antimalware", securityService + "&lt;EM&gt;" + malwareCategory +"&lt;/EM&gt;"+ category , securityService == "Antispam", securityService + "&lt;EM&gt;" + verdict + "&lt;/EM&gt;" + category , true(), "BROKEN/FIXME")    (This on is working when you use this under search using eval command but when you define it under calculated field it stops working)&lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2019 01:43:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Help-require-to-define-calculate-field/m-p/447416#M3971</guid>
      <dc:creator>sumitkathpal</dc:creator>
      <dc:date>2019-05-08T01:43:55Z</dc:date>
    </item>
  </channel>
</rss>

