<?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 Concatenate fields into string on form in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Concatenate-fields-into-string-on-form/m-p/42139#M9809</link>
    <description>&lt;P&gt;I want a form that will allow a user to "build" the appropriate "source" (or log file name) based on selecting various pieces of data.&lt;/P&gt;

&lt;P&gt;So the fields will be like this:&lt;/P&gt;

&lt;P&gt;Date&lt;BR /&gt;
Application&lt;BR /&gt;
Server&lt;/P&gt;

&lt;P&gt;I want to then build a string to use in the search.&lt;/P&gt;

&lt;P&gt;Trying to use eval but getting now where....&lt;/P&gt;

&lt;P&gt;sourcetype=MySourceType | eval sourcelog=Date."-".Application."-".Server.".log" |search source=sourcelog&lt;/P&gt;

&lt;P&gt;This always returns 0 results.  If I leave out the search function, the sourcelog field is populated.&lt;/P&gt;

&lt;P&gt;Once I can get this search to work, I can use it in the populatingsearch function of the form.&lt;/P&gt;

&lt;P&gt;Ideas?&lt;/P&gt;</description>
    <pubDate>Wed, 13 Jul 2011 15:47:39 GMT</pubDate>
    <dc:creator>timmy13</dc:creator>
    <dc:date>2011-07-13T15:47:39Z</dc:date>
    <item>
      <title>Concatenate fields into string on form</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Concatenate-fields-into-string-on-form/m-p/42139#M9809</link>
      <description>&lt;P&gt;I want a form that will allow a user to "build" the appropriate "source" (or log file name) based on selecting various pieces of data.&lt;/P&gt;

&lt;P&gt;So the fields will be like this:&lt;/P&gt;

&lt;P&gt;Date&lt;BR /&gt;
Application&lt;BR /&gt;
Server&lt;/P&gt;

&lt;P&gt;I want to then build a string to use in the search.&lt;/P&gt;

&lt;P&gt;Trying to use eval but getting now where....&lt;/P&gt;

&lt;P&gt;sourcetype=MySourceType | eval sourcelog=Date."-".Application."-".Server.".log" |search source=sourcelog&lt;/P&gt;

&lt;P&gt;This always returns 0 results.  If I leave out the search function, the sourcelog field is populated.&lt;/P&gt;

&lt;P&gt;Once I can get this search to work, I can use it in the populatingsearch function of the form.&lt;/P&gt;

&lt;P&gt;Ideas?&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2011 15:47:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Concatenate-fields-into-string-on-form/m-p/42139#M9809</guid>
      <dc:creator>timmy13</dc:creator>
      <dc:date>2011-07-13T15:47:39Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenate fields into string on form</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Concatenate-fields-into-string-on-form/m-p/42140#M9810</link>
      <description>&lt;P&gt;When comparing two fields you want to use the &lt;CODE&gt;where&lt;/CODE&gt; command instead:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=MySourceType | eval sourcelog=Date."-".Application."-".Server.".log" | where source=sourcelog
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 13 Jul 2011 22:49:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Concatenate-fields-into-string-on-form/m-p/42140#M9810</guid>
      <dc:creator>hazekamp</dc:creator>
      <dc:date>2011-07-13T22:49:26Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenate fields into string on form</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Concatenate-fields-into-string-on-form/m-p/42141#M9811</link>
      <description>&lt;P&gt;Great hazekamp, thanks for the help.  That works, but I still have a problem.&lt;/P&gt;

&lt;P&gt;Of course, when defining source=, I can use wild cards.  However, when I place wildcards into sourcelog, and then use the where source=sourcelog command, it fails.  seems the where doesn't like wildcards.&lt;/P&gt;

&lt;P&gt;Ideas?&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jul 2011 19:32:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Concatenate-fields-into-string-on-form/m-p/42141#M9811</guid>
      <dc:creator>timmy13</dc:creator>
      <dc:date>2011-07-14T19:32:45Z</dc:date>
    </item>
  </channel>
</rss>

