<?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: edit fields with eval expressions in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/edit-fields-with-eval-expressions/m-p/533596#M150788</link>
    <description>&lt;P&gt;I appreciate the reply, unfortunately it did not work. There are 2 eval expressions seen as below. Does there need to be something in between? Thank you !&lt;/P&gt;&lt;P&gt;if(isnull(action) OR action="","unknown",action)&lt;BR /&gt;if(act="File quarantined","blocked",action)&lt;/P&gt;</description>
    <pubDate>Fri, 18 Dec 2020 17:39:49 GMT</pubDate>
    <dc:creator>jerm1020rq</dc:creator>
    <dc:date>2020-12-18T17:39:49Z</dc:date>
    <item>
      <title>edit fields with eval expressions</title>
      <link>https://community.splunk.com/t5/Splunk-Search/edit-fields-with-eval-expressions/m-p/533585#M150785</link>
      <description>&lt;P&gt;I am receiving an error of "&lt;SPAN&gt;The expression is malformed. Expected IN." any time we search utilizing the web data model. When i remove this eval expression 'if(act="File quarantined","blocked",action)' the search works fine so I am assuming that this is the problem child. does anyone see anything inherently wrong with this expression?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Dec 2020 16:35:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/edit-fields-with-eval-expressions/m-p/533585#M150785</guid>
      <dc:creator>jerm1020rq</dc:creator>
      <dc:date>2020-12-18T16:35:44Z</dc:date>
    </item>
    <item>
      <title>Re: edit fields with eval expressions</title>
      <link>https://community.splunk.com/t5/Splunk-Search/edit-fields-with-eval-expressions/m-p/533589#M150786</link>
      <description>&lt;P&gt;try changing it to&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;if(action="File quarantined","blocked",action)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That looks to me like the intent is to re-write the action to be "blocked" for a quarantine message, otherwise leave action as it was&lt;/P&gt;&lt;P&gt;if (action = quarantine, re-write it as action="blocked", otherwise set action=action( i.e whatever it already was) )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Dec 2020 17:15:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/edit-fields-with-eval-expressions/m-p/533589#M150786</guid>
      <dc:creator>nickhills</dc:creator>
      <dc:date>2020-12-18T17:15:49Z</dc:date>
    </item>
    <item>
      <title>Re: edit fields with eval expressions</title>
      <link>https://community.splunk.com/t5/Splunk-Search/edit-fields-with-eval-expressions/m-p/533596#M150788</link>
      <description>&lt;P&gt;I appreciate the reply, unfortunately it did not work. There are 2 eval expressions seen as below. Does there need to be something in between? Thank you !&lt;/P&gt;&lt;P&gt;if(isnull(action) OR action="","unknown",action)&lt;BR /&gt;if(act="File quarantined","blocked",action)&lt;/P&gt;</description>
      <pubDate>Fri, 18 Dec 2020 17:39:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/edit-fields-with-eval-expressions/m-p/533596#M150788</guid>
      <dc:creator>jerm1020rq</dc:creator>
      <dc:date>2020-12-18T17:39:49Z</dc:date>
    </item>
    <item>
      <title>Re: edit fields with eval expressions</title>
      <link>https://community.splunk.com/t5/Splunk-Search/edit-fields-with-eval-expressions/m-p/533597#M150789</link>
      <description>&lt;P&gt;Where are you seeing this? Inside the web datamodel?&lt;/P&gt;&lt;P&gt;In which case, the action field should look like this (see attached)&lt;/P&gt;&lt;P&gt;If you really want to include that additional logic into the datamodel (which I am reluctant to advise) you will need to change it to a "case" statement, you cant just layer up additional "if()"s.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;case(action="File quarantined","blocked", isnull(action) OR action="","unknown", 1=1, action)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Dec 2020 17:48:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/edit-fields-with-eval-expressions/m-p/533597#M150789</guid>
      <dc:creator>nickhills</dc:creator>
      <dc:date>2020-12-18T17:48:27Z</dc:date>
    </item>
  </channel>
</rss>

