Hi Guys,
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..
Regards
Vikas
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.
here is my code
I found another solution for this . Using Lookup you can achieve the same.
follow the following steps
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.
2) Create a new lookup from Settings--->Lookups-->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".
3) Make sure u chkd the permissions it should be global.
4) Now open splunk and type the following code and that is it.
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.
here is my code
Thanks Theouhuios
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.
See Splunk documentation for how a search can be used to populate dropdown.
Splunk 6.x - http://docs.splunk.com/Documentation/Splunk/latest/Viz/PanelreferenceforSimplifiedXML#dropdown
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.