<?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 can I use a field value as a field name and make that a drop-down value? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-use-a-field-value-as-a-field-name-and-make-that-a-drop/m-p/123482#M33338</link>
    <description>&lt;P&gt;Based on what you've written, field aliasing might be a good solution for you: &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.3/Knowledge/Addaliasestofields"&gt;http://docs.splunk.com/Documentation/Splunk/6.2.3/Knowledge/Addaliasestofields&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;It allows you to  -- in your example -- alias "ID" field to  "Errorid" field such that the two searches are identical:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Errorid="Blah"  | 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Is the same as:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; ID="Blah" | 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 27 May 2015 13:49:44 GMT</pubDate>
    <dc:creator>srussell_splunk</dc:creator>
    <dc:date>2015-05-27T13:49:44Z</dc:date>
    <item>
      <title>How can I use a field value as a field name and make that a drop-down value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-use-a-field-value-as-a-field-name-and-make-that-a-drop/m-p/123479#M33335</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have a requirement where I want to make a common error dashboard for a set of apps with a textbox. There is an &lt;CODE&gt;Errorid&lt;/CODE&gt; field which has different values for different applications i.e &lt;CODE&gt;Errorid&lt;/CODE&gt; can be &lt;CODE&gt;ID&lt;/CODE&gt; for 1 application and &lt;CODE&gt;racfid&lt;/CODE&gt; for another. So I have made a lookup where, for an &lt;CODE&gt;Appid&lt;/CODE&gt;, I find out the corresponding &lt;CODE&gt;Errorid&lt;/CODE&gt;. &lt;/P&gt;

&lt;P&gt;Now if I write the following search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal |lookup lookup_name Appid OUTPUT Errorid
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This gives me the correct &lt;CODE&gt;Errorid&lt;/CODE&gt; Fieldname (like ID) as the field value in the field &lt;CODE&gt;Errorid&lt;/CODE&gt; (i hope I'm clear on this)&lt;/P&gt;

&lt;P&gt;Now I want to somehow make this field value as the fieldname to search further like below:-&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal |lookup lookup_name Appid OUTPUT Errorid|Errorid.value(like ID)=$textboxvalue$|and so on
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Am i doing anything wrong? please advise&lt;/P&gt;</description>
      <pubDate>Wed, 27 May 2015 11:10:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-use-a-field-value-as-a-field-name-and-make-that-a-drop/m-p/123479#M33335</guid>
      <dc:creator>rahul_jasrotia</dc:creator>
      <dc:date>2015-05-27T11:10:03Z</dc:date>
    </item>
    <item>
      <title>Re: How can I use a field value as a field name and make that a drop-down value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-use-a-field-value-as-a-field-name-and-make-that-a-drop/m-p/123480#M33336</link>
      <description>&lt;P&gt;When you say, &lt;CODE&gt;Errorid.value(like ID)=$textboxvalue$&lt;/CODE&gt;,  please Which values your text box is suppose to take in that case? And, is &lt;STRONG&gt;ID&lt;/STRONG&gt; is a field in your events?&lt;/P&gt;</description>
      <pubDate>Wed, 27 May 2015 13:29:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-use-a-field-value-as-a-field-name-and-make-that-a-drop/m-p/123480#M33336</guid>
      <dc:creator>stephanefotso</dc:creator>
      <dc:date>2015-05-27T13:29:45Z</dc:date>
    </item>
    <item>
      <title>Re: How can I use a field value as a field name and make that a drop-down value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-use-a-field-value-as-a-field-name-and-make-that-a-drop/m-p/123481#M33337</link>
      <description>&lt;P&gt;Hi thanks for the reply,&lt;/P&gt;

&lt;P&gt;textbox value will be given by the user, the problem is on the left hand side "Errorid.value(ID)"&lt;BR /&gt;
Yes ID is a field in my events but this is just 1 case, for a different scenario this ID might be by some other name.&lt;/P&gt;

&lt;P&gt;So i want to take the value inside the field errorid and use it as field further in the search string.&lt;/P&gt;</description>
      <pubDate>Wed, 27 May 2015 13:38:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-use-a-field-value-as-a-field-name-and-make-that-a-drop/m-p/123481#M33337</guid>
      <dc:creator>rahul_jasrotia</dc:creator>
      <dc:date>2015-05-27T13:38:49Z</dc:date>
    </item>
    <item>
      <title>Re: How can I use a field value as a field name and make that a drop-down value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-use-a-field-value-as-a-field-name-and-make-that-a-drop/m-p/123482#M33338</link>
      <description>&lt;P&gt;Based on what you've written, field aliasing might be a good solution for you: &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.3/Knowledge/Addaliasestofields"&gt;http://docs.splunk.com/Documentation/Splunk/6.2.3/Knowledge/Addaliasestofields&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;It allows you to  -- in your example -- alias "ID" field to  "Errorid" field such that the two searches are identical:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Errorid="Blah"  | 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Is the same as:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; ID="Blah" | 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 27 May 2015 13:49:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-use-a-field-value-as-a-field-name-and-make-that-a-drop/m-p/123482#M33338</guid>
      <dc:creator>srussell_splunk</dc:creator>
      <dc:date>2015-05-27T13:49:44Z</dc:date>
    </item>
    <item>
      <title>Re: How can I use a field value as a field name and make that a drop-down value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-use-a-field-value-as-a-field-name-and-make-that-a-drop/m-p/123483#M33339</link>
      <description>&lt;P&gt;Means if &lt;STRONG&gt;Errorid&lt;/STRONG&gt; has 5 values, you will have 5 textbox?&lt;/P&gt;</description>
      <pubDate>Wed, 27 May 2015 13:51:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-use-a-field-value-as-a-field-name-and-make-that-a-drop/m-p/123483#M33339</guid>
      <dc:creator>stephanefotso</dc:creator>
      <dc:date>2015-05-27T13:51:55Z</dc:date>
    </item>
    <item>
      <title>Re: How can I use a field value as a field name and make that a drop-down value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-use-a-field-value-as-a-field-name-and-make-that-a-drop/m-p/123484#M33340</link>
      <description>&lt;P&gt;Here is an  example&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;form&amp;gt;
  &amp;lt;label&amp;gt;Text Form Input Element&amp;lt;/label&amp;gt;
  &amp;lt;description&amp;gt;Top N Sourcetypes using Text Form Input&amp;lt;/description&amp;gt;
  &amp;lt;fieldset autoRun="true" submitButton="false"&amp;gt;
    &amp;lt;input type="text" token="ID" searchWhenChanged="true"&amp;gt;
      &amp;lt;label&amp;gt;entern the label you need&amp;lt;/label&amp;gt;
      &amp;lt;default&amp;gt;5&amp;lt;/default&amp;gt;
    &amp;lt;/input&amp;gt;
  &amp;lt;/fieldset&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;table&amp;gt;
      &amp;lt;title&amp;gt;Your title goes here&amp;lt;/title&amp;gt;
      &amp;lt;searchString&amp;gt;index=_internal |lookup lookup_name Appid OUTPUT Errorid | search ID=$ID$  &amp;lt;/searchString&amp;gt;
      &amp;lt;earliestTime&amp;gt;-24h@h&amp;lt;/earliestTime&amp;gt;
      &amp;lt;latestTime&amp;gt;now&amp;lt;/latestTime&amp;gt;
      &amp;lt;option name="rowNumbers"&amp;gt;true&amp;lt;/option&amp;gt;
    &amp;lt;/table&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/form&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 27 May 2015 16:53:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-use-a-field-value-as-a-field-name-and-make-that-a-drop/m-p/123484#M33340</guid>
      <dc:creator>stephanefotso</dc:creator>
      <dc:date>2015-05-27T16:53:18Z</dc:date>
    </item>
    <item>
      <title>Re: How can I use a field value as a field name and make that a drop-down value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-use-a-field-value-as-a-field-name-and-make-that-a-drop/m-p/123485#M33341</link>
      <description>&lt;P&gt;nopes the textbox will always have one value, its just that the value will be used as a fieldname further in the search.&lt;/P&gt;</description>
      <pubDate>Thu, 28 May 2015 04:25:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-use-a-field-value-as-a-field-name-and-make-that-a-drop/m-p/123485#M33341</guid>
      <dc:creator>rahul_jasrotia</dc:creator>
      <dc:date>2015-05-28T04:25:24Z</dc:date>
    </item>
    <item>
      <title>Re: How can I use a field value as a field name and make that a drop-down value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-use-a-field-value-as-a-field-name-and-make-that-a-drop/m-p/123486#M33342</link>
      <description>&lt;P&gt;thanks for the reply, &lt;BR /&gt;
yeah field alias is an option I tried but that would mean that I need to create some 10-15 aliases. I hope I found something to be able to do it from the search itself.&lt;/P&gt;</description>
      <pubDate>Thu, 28 May 2015 04:26:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-use-a-field-value-as-a-field-name-and-make-that-a-drop/m-p/123486#M33342</guid>
      <dc:creator>rahul_jasrotia</dc:creator>
      <dc:date>2015-05-28T04:26:42Z</dc:date>
    </item>
  </channel>
</rss>

