<?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: setting field values in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/setting-field-values/m-p/68627#M17224</link>
    <description>&lt;P&gt;Use &lt;A href="http://www.splunk.com/base/Documentation/4.2/SearchReference/CommonEvalFunctions" rel="nofollow"&gt;coalesce&lt;/A&gt;:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval prefix=coalesce(prefix,"033")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;or alternateively, edit your &lt;A href="http://www.splunk.com/base/Documentation/latest/User/CreateAndConfigureFieldLookups#Include_advanced_options" rel="nofollow"&gt;lookup table&lt;/A&gt; definition to to return a default value.&lt;/P&gt;</description>
    <pubDate>Sun, 27 Mar 2011 22:04:23 GMT</pubDate>
    <dc:creator>southeringtonp</dc:creator>
    <dc:date>2011-03-27T22:04:23Z</dc:date>
    <item>
      <title>setting field values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/setting-field-values/m-p/68626#M17223</link>
      <description>&lt;P&gt;Hi guys,&lt;/P&gt;

&lt;P&gt;how doi go about setting a field value if it is empty...&lt;/P&gt;

&lt;P&gt;I have a field prefix... i use this field when i do a lookup to a csv file... in certain events the field prefix is empty "" and in those cases i would like to set it to 033 so it matches the lookup...&lt;/P&gt;

&lt;P&gt;i tried using eval prefix=if(prefix="","033",prefix) but this does not work...&lt;/P&gt;

&lt;P&gt;any ideas&lt;/P&gt;</description>
      <pubDate>Sun, 27 Mar 2011 21:47:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/setting-field-values/m-p/68626#M17223</guid>
      <dc:creator>kenchisho</dc:creator>
      <dc:date>2011-03-27T21:47:45Z</dc:date>
    </item>
    <item>
      <title>Re: setting field values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/setting-field-values/m-p/68627#M17224</link>
      <description>&lt;P&gt;Use &lt;A href="http://www.splunk.com/base/Documentation/4.2/SearchReference/CommonEvalFunctions" rel="nofollow"&gt;coalesce&lt;/A&gt;:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval prefix=coalesce(prefix,"033")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;or alternateively, edit your &lt;A href="http://www.splunk.com/base/Documentation/latest/User/CreateAndConfigureFieldLookups#Include_advanced_options" rel="nofollow"&gt;lookup table&lt;/A&gt; definition to to return a default value.&lt;/P&gt;</description>
      <pubDate>Sun, 27 Mar 2011 22:04:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/setting-field-values/m-p/68627#M17224</guid>
      <dc:creator>southeringtonp</dc:creator>
      <dc:date>2011-03-27T22:04:23Z</dc:date>
    </item>
  </channel>
</rss>

