<?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: drop down list population with extracted search fields in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/drop-down-list-population-with-extracted-search-fields/m-p/43438#M179147</link>
    <description>&lt;P&gt;The searchtemplate element is for the main search you want to run in the dashboard. The search to get the list of values to display in the dropdown is the &lt;EM&gt;body&lt;/EM&gt; of the populating search element.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;&lt;BR /&gt;
&amp;lt;searchtemplate&amp;gt;big_search_here grid=$grid$&amp;lt;/searchtemplate&amp;gt;&lt;BR /&gt;
&amp;lt;fieldset&amp;gt;&lt;BR /&gt;
  &amp;lt;input type="dropdown" token="grid"&amp;gt;&lt;BR /&gt;
    &amp;lt;populatingSearch fieldForLabel="gridnames" fieldforValue="gridnames"&amp;gt; index=main host=gridnames | fields gridnames | dedup gridnames&amp;lt;/populatingSearch&amp;gt;&lt;BR /&gt;
   &amp;lt;/input&amp;gt;&lt;BR /&gt;
&amp;lt;/fieldset&amp;gt;&lt;BR /&gt;
&lt;/CODE&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 23 May 2013 02:16:08 GMT</pubDate>
    <dc:creator>sowings</dc:creator>
    <dc:date>2013-05-23T02:16:08Z</dc:date>
    <item>
      <title>drop down list population with extracted search fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/drop-down-list-population-with-extracted-search-fields/m-p/43437#M179146</link>
      <description>&lt;P&gt;I'm trying to populate my drop down list with extracted fields of a search, most examples I've seen on splunkbase explain it quite well, but I don't think I'm getting the syntax right, how do I set the 'fields' as the token to pass to my populating search? I currently have this: &lt;/P&gt;

&lt;P&gt;&amp;lt;! -- default search to assign tokens ---&amp;gt;&lt;BR /&gt;&lt;BR /&gt;
 &lt;SEARCHTEMPLATE&gt;&lt;BR /&gt;&lt;BR /&gt;
   index=main host=gridnames | fields gridnames | dedup gridnames &amp;lt;!- set $grid$ here: HOW?&amp;gt;&lt;BR /&gt;&lt;BR /&gt;
 &lt;/SEARCHTEMPLATE&gt;      &lt;/P&gt;

&lt;!----- creating and populating drop down ----&gt;  

&lt;P&gt;&lt;FIELDSET&gt;&lt;BR /&gt;&lt;BR /&gt;
   &lt;INPUT type="dropdown" token="grid" /&gt;&lt;BR /&gt;&lt;BR /&gt;
      &lt;LABEL&gt;Select grid&lt;/LABEL&gt;&lt;BR /&gt;&lt;BR /&gt;
      &lt;POPULATINGSEARCH fieldforvalue="grid" fieldforlabel="grid"&gt;&lt;BR /&gt;&lt;BR /&gt;
        &amp;lt;![CDATA[index="main" host=gridnames| fields grid | dedup grid]]&amp;gt;&lt;BR /&gt;&lt;BR /&gt;
      &lt;/POPULATINGSEARCH&gt;&lt;BR /&gt;&lt;BR /&gt;
      &lt;CHOICE value="*"&gt;default&lt;/CHOICE&gt;&lt;BR /&gt;&lt;BR /&gt;
   &lt;BR /&gt;&lt;BR /&gt;
  &lt;/FIELDSET&gt;   &lt;/P&gt;

&lt;P&gt;I know I'm not setting $grid$ in the searchtemplate, but how do I do it for the field gridnames?  &lt;/P&gt;</description>
      <pubDate>Thu, 23 May 2013 00:07:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/drop-down-list-population-with-extracted-search-fields/m-p/43437#M179146</guid>
      <dc:creator>santoshbala</dc:creator>
      <dc:date>2013-05-23T00:07:27Z</dc:date>
    </item>
    <item>
      <title>Re: drop down list population with extracted search fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/drop-down-list-population-with-extracted-search-fields/m-p/43438#M179147</link>
      <description>&lt;P&gt;The searchtemplate element is for the main search you want to run in the dashboard. The search to get the list of values to display in the dropdown is the &lt;EM&gt;body&lt;/EM&gt; of the populating search element.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;&lt;BR /&gt;
&amp;lt;searchtemplate&amp;gt;big_search_here grid=$grid$&amp;lt;/searchtemplate&amp;gt;&lt;BR /&gt;
&amp;lt;fieldset&amp;gt;&lt;BR /&gt;
  &amp;lt;input type="dropdown" token="grid"&amp;gt;&lt;BR /&gt;
    &amp;lt;populatingSearch fieldForLabel="gridnames" fieldforValue="gridnames"&amp;gt; index=main host=gridnames | fields gridnames | dedup gridnames&amp;lt;/populatingSearch&amp;gt;&lt;BR /&gt;
   &amp;lt;/input&amp;gt;&lt;BR /&gt;
&amp;lt;/fieldset&amp;gt;&lt;BR /&gt;
&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 23 May 2013 02:16:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/drop-down-list-population-with-extracted-search-fields/m-p/43438#M179147</guid>
      <dc:creator>sowings</dc:creator>
      <dc:date>2013-05-23T02:16:08Z</dc:date>
    </item>
    <item>
      <title>Re: drop down list population with extracted search fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/drop-down-list-population-with-extracted-search-fields/m-p/43439#M179148</link>
      <description>&lt;P&gt;Brilliant! Works a treat! thanks a lot!&lt;/P&gt;

&lt;P&gt;For anyone else looking:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;searchTemplate&amp;gt; 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;index=main host=gridnames | fields $grid$ | dedup $grid$ &lt;BR /&gt;
     &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;fieldset&amp;gt; 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;INPUT type="dropdown" token="grid" /&gt; &lt;BR /&gt;
      &lt;LABEL&gt;Select grid&lt;/LABEL&gt; &lt;BR /&gt;
      &lt;POPULATINGSEARCH fieldforvalue="gridnames" fieldforlabel="gridnames"&gt; &lt;BR /&gt;
        &amp;lt;![CDATA[index="main" host=gridnames| fields gridnames | dedup gridnames]]&amp;gt; &lt;BR /&gt;
      &lt;/POPULATINGSEARCH&gt; &lt;BR /&gt;
      &lt;CHOICE value="*"&gt;testabooga&lt;/CHOICE&gt; &lt;BR /&gt;
    &lt;BR /&gt;
   &lt;/P&gt;</description>
      <pubDate>Thu, 23 May 2013 03:34:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/drop-down-list-population-with-extracted-search-fields/m-p/43439#M179148</guid>
      <dc:creator>santoshbala</dc:creator>
      <dc:date>2013-05-23T03:34:04Z</dc:date>
    </item>
  </channel>
</rss>

