<?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: How to write an eval condition to replace a field ? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-an-eval-condition-to-replace-a-field/m-p/308856#M92617</link>
    <description>&lt;P&gt;How about this?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval field_A=if(field_A=="not registered" AND field_B=="PROVISIONING", "regiestred but not monitored", field_A)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 22 Feb 2018 20:26:26 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2018-02-22T20:26:26Z</dc:date>
    <item>
      <title>How to write an eval condition to replace a field ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-an-eval-condition-to-replace-a-field/m-p/308855#M92616</link>
      <description>&lt;P&gt;I have a query which displays some tabular results and when a certain condition is matched for 2 field values I want to insert a new value to Field_A like below &lt;/P&gt;

&lt;P&gt;If field_A="not registered" and field_B="PROVISIONING" for a list of hosts then I want to change the Field_A value from "not registered" to "registered but not monitored"&lt;/P&gt;

&lt;P&gt;How can I write an eval condition to satisfy the above. I have some how managed to get a little further like below &lt;/P&gt;

&lt;P&gt;| eval field_A=if(field_A=="not registered" AND field_B=="PROVISIONING")&lt;/P&gt;

&lt;P&gt;Please complete the above part eval condition above if someone knows how to do it?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 18:11:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-an-eval-condition-to-replace-a-field/m-p/308855#M92616</guid>
      <dc:creator>pavanae</dc:creator>
      <dc:date>2020-09-29T18:11:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to write an eval condition to replace a field ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-an-eval-condition-to-replace-a-field/m-p/308856#M92617</link>
      <description>&lt;P&gt;How about this?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval field_A=if(field_A=="not registered" AND field_B=="PROVISIONING", "regiestred but not monitored", field_A)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 22 Feb 2018 20:26:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-an-eval-condition-to-replace-a-field/m-p/308856#M92617</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2018-02-22T20:26:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to write an eval condition to replace a field ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-an-eval-condition-to-replace-a-field/m-p/308857#M92618</link>
      <description>&lt;P&gt;hello , Please how can i create a condition in a search to replace an event with a name , even if this event does not exist at the moment&lt;/P&gt;</description>
      <pubDate>Tue, 26 Mar 2019 10:57:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-an-eval-condition-to-replace-a-field/m-p/308857#M92618</guid>
      <dc:creator>aalaa</dc:creator>
      <dc:date>2019-03-26T10:57:38Z</dc:date>
    </item>
  </channel>
</rss>

