<?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: database field value in dropdown in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/database-field-value-in-dropdown/m-p/144517#M8750</link>
    <description>&lt;P&gt;Finally I crack this and i did not believe it was just a silly mistake. I just mentioned field name in "" in the dbquery  which is "opendate".So keep this in mind whatever you are mentioning in the fieldforvalue and fieldforlable should be similar to ur field name in dbquery that is it.&lt;BR /&gt;
here is my code &lt;/P&gt;

&lt;P&gt;&lt;FIELDSET&gt;&lt;BR /&gt;
        &amp;lt;!-- Define a simple dropdown form driven by a search --&amp;gt;&lt;BR /&gt;
        &lt;INPUT type="dropdown" token="opendate" /&gt;&lt;BR /&gt;
            &lt;LABEL&gt;Select series&lt;/LABEL&gt;&lt;BR /&gt;
            &lt;POPULATINGSEARCH fieldforvalue="opendate" fieldforlabel="opendate"&gt;&lt;BR /&gt;
              &amp;lt;![CDATA[| dbquery "Finance Database" "select distinct open_date "opendate" from ABC"  ]]&amp;gt;&lt;/POPULATINGSEARCH&gt;&lt;BR /&gt;
        &lt;BR /&gt;
    &lt;/FIELDSET&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 13 Feb 2014 11:50:07 GMT</pubDate>
    <dc:creator>vikas_gopal</dc:creator>
    <dc:date>2014-02-13T11:50:07Z</dc:date>
    <item>
      <title>database field value in dropdown</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/database-field-value-in-dropdown/m-p/144513#M8746</link>
      <description>&lt;P&gt;Hi Guys,&lt;/P&gt;

&lt;P&gt;I have a DBquery "select distinct open_date from ABC" .I want to show these dates in dropdown list .Please suggest how to do it..&lt;/P&gt;

&lt;P&gt;Regards&lt;BR /&gt;
Vikas&lt;/P&gt;</description>
      <pubDate>Mon, 10 Feb 2014 18:16:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/database-field-value-in-dropdown/m-p/144513#M8746</guid>
      <dc:creator>vikas_gopal</dc:creator>
      <dc:date>2014-02-10T18:16:11Z</dc:date>
    </item>
    <item>
      <title>Re: database field value in dropdown</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/database-field-value-in-dropdown/m-p/144514#M8747</link>
      <description>&lt;P&gt;Where do you want to show these dates? In a dashboard? You will have to pull the data in first to be able to do that. Please add some more information on what you plan to do.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Feb 2014 18:54:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/database-field-value-in-dropdown/m-p/144514#M8747</guid>
      <dc:creator>theouhuios</dc:creator>
      <dc:date>2014-02-10T18:54:33Z</dc:date>
    </item>
    <item>
      <title>Re: database field value in dropdown</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/database-field-value-in-dropdown/m-p/144515#M8748</link>
      <description>&lt;P&gt;See Splunk documentation for how a search can be used to populate dropdown.&lt;BR /&gt;
Splunk 6.x - &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Viz/PanelreferenceforSimplifiedXML#dropdown"&gt;http://docs.splunk.com/Documentation/Splunk/latest/Viz/PanelreferenceforSimplifiedXML#dropdown&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Feb 2014 19:17:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/database-field-value-in-dropdown/m-p/144515#M8748</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-02-10T19:17:18Z</dc:date>
    </item>
    <item>
      <title>Re: database field value in dropdown</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/database-field-value-in-dropdown/m-p/144516#M8749</link>
      <description>&lt;P&gt;Thanks Theouhuios&lt;/P&gt;

&lt;P&gt;Actually I am preparing a dashboard which takes input from oracle database and I want to show date field in dropdown, user will select one date from the dropdown list and on the basis of that dashboard table shows data.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Feb 2014 09:47:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/database-field-value-in-dropdown/m-p/144516#M8749</guid>
      <dc:creator>vikas_gopal</dc:creator>
      <dc:date>2014-02-11T09:47:22Z</dc:date>
    </item>
    <item>
      <title>Re: database field value in dropdown</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/database-field-value-in-dropdown/m-p/144517#M8750</link>
      <description>&lt;P&gt;Finally I crack this and i did not believe it was just a silly mistake. I just mentioned field name in "" in the dbquery  which is "opendate".So keep this in mind whatever you are mentioning in the fieldforvalue and fieldforlable should be similar to ur field name in dbquery that is it.&lt;BR /&gt;
here is my code &lt;/P&gt;

&lt;P&gt;&lt;FIELDSET&gt;&lt;BR /&gt;
        &amp;lt;!-- Define a simple dropdown form driven by a search --&amp;gt;&lt;BR /&gt;
        &lt;INPUT type="dropdown" token="opendate" /&gt;&lt;BR /&gt;
            &lt;LABEL&gt;Select series&lt;/LABEL&gt;&lt;BR /&gt;
            &lt;POPULATINGSEARCH fieldforvalue="opendate" fieldforlabel="opendate"&gt;&lt;BR /&gt;
              &amp;lt;![CDATA[| dbquery "Finance Database" "select distinct open_date "opendate" from ABC"  ]]&amp;gt;&lt;/POPULATINGSEARCH&gt;&lt;BR /&gt;
        &lt;BR /&gt;
    &lt;/FIELDSET&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Feb 2014 11:50:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/database-field-value-in-dropdown/m-p/144517#M8750</guid>
      <dc:creator>vikas_gopal</dc:creator>
      <dc:date>2014-02-13T11:50:07Z</dc:date>
    </item>
    <item>
      <title>Re: database field value in dropdown</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/database-field-value-in-dropdown/m-p/144518#M8751</link>
      <description>&lt;P&gt;I found another solution for this . Using Lookup you can achieve the same.&lt;BR /&gt;
follow the following steps&lt;BR /&gt;
1) Create a csv file in the following location "Splunk home\etc\apps\dbx\lookups lets say the file is "user.csv".Make sure u must have some data in the CSV file.Else if u chk my code I am creating a CSV from dbquery with the help of | outputlookup command.&lt;BR /&gt;
2) Create a new lookup from Settings---&amp;gt;Lookups--&amp;gt;Lookup table file  here select the same csv file which u have created u can choose the same file name in the destination lets say the name is "vikaslookup".&lt;BR /&gt;
3) Make sure u chkd the permissions it should be global.&lt;BR /&gt;
4) Now open splunk and type the following code and that is it.&lt;/P&gt;

&lt;P&gt;&lt;SEARCHTEMPLATE&gt;| dbquery "your database" "select abcdate as "Fromdate" from help"| outputlookup user.csv &lt;/SEARCHTEMPLATE&gt;&lt;BR /&gt;
&lt;FIELDSET&gt;&lt;BR /&gt;
    &lt;INPUT type="dropdown" token="FromDate" /&gt;&lt;BR /&gt;
      &lt;POPULATINGSEARCH fieldforvalue="FromDate" fieldforlabel="FromDate"&gt;&lt;BR /&gt;
        &amp;lt;![CDATA[ | inputlookup vikaslookup ]]&amp;gt;&lt;BR /&gt;
      &lt;/POPULATINGSEARCH&gt;&lt;BR /&gt;
      &lt;DEFAULT&gt;2013&lt;/DEFAULT&gt;&lt;BR /&gt;
 &lt;/FIELDSET&gt;   &lt;/P&gt;</description>
      <pubDate>Thu, 13 Feb 2014 13:21:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/database-field-value-in-dropdown/m-p/144518#M8751</guid>
      <dc:creator>vikas_gopal</dc:creator>
      <dc:date>2014-02-13T13:21:21Z</dc:date>
    </item>
  </channel>
</rss>

