<?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 Eval command on a field with multiple words in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Eval-command-on-a-field-with-multiple-words/m-p/50291#M12084</link>
    <description>&lt;P&gt;I want to use the eval command to create another field using an existing field. However, the existing field has multiple words. Normally, I would use quotation marks around the field, but eval treats that as a string.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|eval newfield="My Old Field"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This code would simple use the string "my Old Field" instead of values from a field called "My Old Field". How do i fix this?&lt;/P&gt;</description>
    <pubDate>Mon, 04 Mar 2013 18:45:54 GMT</pubDate>
    <dc:creator>cmak</dc:creator>
    <dc:date>2013-03-04T18:45:54Z</dc:date>
    <item>
      <title>Eval command on a field with multiple words</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Eval-command-on-a-field-with-multiple-words/m-p/50291#M12084</link>
      <description>&lt;P&gt;I want to use the eval command to create another field using an existing field. However, the existing field has multiple words. Normally, I would use quotation marks around the field, but eval treats that as a string.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|eval newfield="My Old Field"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This code would simple use the string "my Old Field" instead of values from a field called "My Old Field". How do i fix this?&lt;/P&gt;</description>
      <pubDate>Mon, 04 Mar 2013 18:45:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Eval-command-on-a-field-with-multiple-words/m-p/50291#M12084</guid>
      <dc:creator>cmak</dc:creator>
      <dc:date>2013-03-04T18:45:54Z</dc:date>
    </item>
    <item>
      <title>Re: Eval command on a field with multiple words</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Eval-command-on-a-field-with-multiple-words/m-p/50292#M12085</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;|eval newfield=$My Old Field$
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 04 Mar 2013 19:05:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Eval-command-on-a-field-with-multiple-words/m-p/50292#M12085</guid>
      <dc:creator>jonuwz</dc:creator>
      <dc:date>2013-03-04T19:05:07Z</dc:date>
    </item>
    <item>
      <title>Re: Eval command on a field with multiple words</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Eval-command-on-a-field-with-multiple-words/m-p/50293#M12086</link>
      <description>&lt;P&gt;Great, it works &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Mar 2013 19:06:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Eval-command-on-a-field-with-multiple-words/m-p/50293#M12086</guid>
      <dc:creator>cmak</dc:creator>
      <dc:date>2013-03-04T19:06:08Z</dc:date>
    </item>
    <item>
      <title>Re: Eval command on a field with multiple words</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Eval-command-on-a-field-with-multiple-words/m-p/50294#M12087</link>
      <description>&lt;P&gt;Another way is to use single quotes for field names with difficult characters:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;eval newfield='My Old Field'
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Note that this works in eval and where clauses, but quoting in search commands in general is inconsistent.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Mar 2013 19:41:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Eval-command-on-a-field-with-multiple-words/m-p/50294#M12087</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2013-03-04T19:41:10Z</dc:date>
    </item>
    <item>
      <title>Re: Eval command on a field with multiple words</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Eval-command-on-a-field-with-multiple-words/m-p/50295#M12088</link>
      <description>&lt;P&gt;Great, this works for advanced XML dashboards&lt;/P&gt;</description>
      <pubDate>Mon, 04 Mar 2013 23:16:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Eval-command-on-a-field-with-multiple-words/m-p/50295#M12088</guid>
      <dc:creator>cmak</dc:creator>
      <dc:date>2013-03-04T23:16:06Z</dc:date>
    </item>
  </channel>
</rss>

