<?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 is overwriting field of other add-on in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/EVAL-is-overwriting-field-of-other-add-on/m-p/272133#M175740</link>
    <description>&lt;P&gt;Thank you. That's what I wanted to confirm.&lt;/P&gt;</description>
    <pubDate>Thu, 02 Feb 2017 07:11:01 GMT</pubDate>
    <dc:creator>rleena</dc:creator>
    <dc:date>2017-02-02T07:11:01Z</dc:date>
    <item>
      <title>EVAL is overwriting field of other add-on</title>
      <link>https://community.splunk.com/t5/Splunk-Search/EVAL-is-overwriting-field-of-other-add-on/m-p/272122#M175729</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have an EVAL statements in two add-ons. The field names are same and the add-on that comes later in alphabetical order, overwrites the value set by earlier add-on. I have tried coalesce with if statement, but not able to solve this problem. In the second add-on when I am checking, looks like the value of the field is null and the one that has been set by the earlier add-on. So seems like there is no way to retain it conditionally, rather than overwriting it. &lt;/P&gt;

&lt;P&gt;Kindly suggest a solution. Thank you.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Feb 2017 02:04:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/EVAL-is-overwriting-field-of-other-add-on/m-p/272122#M175729</guid>
      <dc:creator>rleena</dc:creator>
      <dc:date>2017-02-01T02:04:29Z</dc:date>
    </item>
    <item>
      <title>Re: EVAL is overwriting field of other add-on</title>
      <link>https://community.splunk.com/t5/Splunk-Search/EVAL-is-overwriting-field-of-other-add-on/m-p/272123#M175730</link>
      <description>&lt;P&gt;My suggestion would be to not use the same field name in two different add-ons.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Feb 2017 21:47:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/EVAL-is-overwriting-field-of-other-add-on/m-p/272123#M175730</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2017-02-01T21:47:18Z</dc:date>
    </item>
    <item>
      <title>Re: EVAL is overwriting field of other add-on</title>
      <link>https://community.splunk.com/t5/Splunk-Search/EVAL-is-overwriting-field-of-other-add-on/m-p/272124#M175731</link>
      <description>&lt;P&gt;These are add-ons you downloaded from Splunk apps or your custom? A suggested by Lisa, either don't use the same named field in two add-ons or remove the EVAL from both the Add-ons and create it in separate add-on/apps. &lt;/P&gt;</description>
      <pubDate>Wed, 01 Feb 2017 22:34:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/EVAL-is-overwriting-field-of-other-add-on/m-p/272124#M175731</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-02-01T22:34:16Z</dc:date>
    </item>
    <item>
      <title>Re: EVAL is overwriting field of other add-on</title>
      <link>https://community.splunk.com/t5/Splunk-Search/EVAL-is-overwriting-field-of-other-add-on/m-p/272125#M175732</link>
      <description>&lt;P&gt;Hello, Thank you for response. I am trying to create a custom add-on.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Feb 2017 05:03:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/EVAL-is-overwriting-field-of-other-add-on/m-p/272125#M175732</guid>
      <dc:creator>rleena</dc:creator>
      <dc:date>2017-02-02T05:03:08Z</dc:date>
    </item>
    <item>
      <title>Re: EVAL is overwriting field of other add-on</title>
      <link>https://community.splunk.com/t5/Splunk-Search/EVAL-is-overwriting-field-of-other-add-on/m-p/272126#M175733</link>
      <description>&lt;P&gt;So, in the EVAL of the custom add-on which has higher precedence, you include the condition/expression you used in first add-on as well. So that if it's overwrite, it still follows the same expression. &lt;/P&gt;

&lt;P&gt;E.g. add-on 1&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;EVAL-field = &amp;lt;&amp;lt;some expression giving value1&amp;gt;&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;add-on 2&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;EVAL-field = coalesce(&amp;lt;&amp;lt;some expression giving value2&amp;gt;&amp;gt;,&amp;lt;&amp;lt;some expression giving value1&amp;gt;&amp;gt;)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 02 Feb 2017 05:07:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/EVAL-is-overwriting-field-of-other-add-on/m-p/272126#M175733</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-02-02T05:07:16Z</dc:date>
    </item>
    <item>
      <title>Re: EVAL is overwriting field of other add-on</title>
      <link>https://community.splunk.com/t5/Splunk-Search/EVAL-is-overwriting-field-of-other-add-on/m-p/272127#M175734</link>
      <description>&lt;P&gt;Thank you. I want to check expression for my messages and set a value for field using EVAL if expression is true, and if not, then don't touch the existing field value for other messages. Is that possible?&lt;/P&gt;</description>
      <pubDate>Thu, 02 Feb 2017 05:14:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/EVAL-is-overwriting-field-of-other-add-on/m-p/272127#M175734</guid>
      <dc:creator>rleena</dc:creator>
      <dc:date>2017-02-02T05:14:55Z</dc:date>
    </item>
    <item>
      <title>Re: EVAL is overwriting field of other add-on</title>
      <link>https://community.splunk.com/t5/Splunk-Search/EVAL-is-overwriting-field-of-other-add-on/m-p/272128#M175735</link>
      <description>&lt;P&gt;Did you try like this already&lt;/P&gt;

&lt;P&gt;2nd Add-on&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;EVAL-field = if(&amp;lt;&amp;lt;some_expression evaluate true&amp;gt;&amp;gt;,"SomesValue",field)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If above doesn't work, can you share the EVAL definition that you have in other add-on?&lt;/P&gt;</description>
      <pubDate>Thu, 02 Feb 2017 05:27:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/EVAL-is-overwriting-field-of-other-add-on/m-p/272128#M175735</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-02-02T05:27:44Z</dc:date>
    </item>
    <item>
      <title>Re: EVAL is overwriting field of other add-on</title>
      <link>https://community.splunk.com/t5/Splunk-Search/EVAL-is-overwriting-field-of-other-add-on/m-p/272129#M175736</link>
      <description>&lt;P&gt;yes I have tried, the field value is null in my add-on. I even checked with isnull(). So when condition is not evaluating to true, it overwrites with null for other messages&lt;/P&gt;</description>
      <pubDate>Thu, 02 Feb 2017 05:32:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/EVAL-is-overwriting-field-of-other-add-on/m-p/272129#M175736</guid>
      <dc:creator>rleena</dc:creator>
      <dc:date>2017-02-02T05:32:55Z</dc:date>
    </item>
    <item>
      <title>Re: EVAL is overwriting field of other add-on</title>
      <link>https://community.splunk.com/t5/Splunk-Search/EVAL-is-overwriting-field-of-other-add-on/m-p/272130#M175737</link>
      <description>&lt;P&gt;Can you share the exact props.conf entry that you have/tried in both the add-on for that field?&lt;/P&gt;</description>
      <pubDate>Thu, 02 Feb 2017 05:44:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/EVAL-is-overwriting-field-of-other-add-on/m-p/272130#M175737</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-02-02T05:44:42Z</dc:date>
    </item>
    <item>
      <title>Re: EVAL is overwriting field of other add-on</title>
      <link>https://community.splunk.com/t5/Splunk-Search/EVAL-is-overwriting-field-of-other-add-on/m-p/272131#M175738</link>
      <description>&lt;P&gt;In the first add-on which is not mine, &lt;BR /&gt;
EVAL-vendor_product = "abc"&lt;/P&gt;

&lt;P&gt;In my add-on: (comes alphabetically next)&lt;BR /&gt;
EVAL-vendor_product = if(searchmatch("testproduct"),"test",vendor_product)&lt;/P&gt;

&lt;P&gt;Now, "test" is correctly assigned to my messages, but for other messages "abc" is overwritten by null. vendor_product field is removed basically. &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 12:42:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/EVAL-is-overwriting-field-of-other-add-on/m-p/272131#M175738</guid>
      <dc:creator>rleena</dc:creator>
      <dc:date>2020-09-29T12:42:22Z</dc:date>
    </item>
    <item>
      <title>Re: EVAL is overwriting field of other add-on</title>
      <link>https://community.splunk.com/t5/Splunk-Search/EVAL-is-overwriting-field-of-other-add-on/m-p/272132#M175739</link>
      <description>&lt;P&gt;You need to copy the expression used in first add-on to your add-on where you're setting the default value. So you need to use this in your add-on.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;EVAL-vendor_product = if(searchmatch("testproduct"),"test","abc")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If your add-on is installed, the first add-on's configuration doesn't apply and there is no verndor_product field available before hand. So when your's is evaluated, it assigns null for vendor_product to events which are not matching your expression.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 01:20:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/EVAL-is-overwriting-field-of-other-add-on/m-p/272132#M175739</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2020-09-30T01:20:44Z</dc:date>
    </item>
    <item>
      <title>Re: EVAL is overwriting field of other add-on</title>
      <link>https://community.splunk.com/t5/Splunk-Search/EVAL-is-overwriting-field-of-other-add-on/m-p/272133#M175740</link>
      <description>&lt;P&gt;Thank you. That's what I wanted to confirm.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Feb 2017 07:11:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/EVAL-is-overwriting-field-of-other-add-on/m-p/272133#M175740</guid>
      <dc:creator>rleena</dc:creator>
      <dc:date>2017-02-02T07:11:01Z</dc:date>
    </item>
  </channel>
</rss>

