Dashboards & Visualizations

cannot get result in dropdown

vikas_gopal
Builder

Hello Everyone,
I have the following simple xml code but nothing is appearing in the dropdown. Please help me with the code.


| dbquery "Finance Database" "select book_type_code from fa_deprn_periods" book_type_code=$book_type_code$ | fields book_type_code



<![CDATA[ | dbquery "Finance Database" "select book_type_code from fa_deprn_periods"]]>
Any


Thanks in advance

Tags (1)
0 Karma
1 Solution

vikas_gopal
Builder

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 "bookcode".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


<!-- Define a simple dropdown form driven by a search -->



<![CDATA[| dbquery "Finance Database" "select distinct book_type_code "bookcode" from fa_deprn_periods where period_name='JAN-09' and book_type_code='CORPORATE USA'" ]]>


View solution in original post

0 Karma

vikas_gopal
Builder

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 "bookcode".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


<!-- Define a simple dropdown form driven by a search -->



<![CDATA[| dbquery "Finance Database" "select distinct book_type_code "bookcode" from fa_deprn_periods where period_name='JAN-09' and book_type_code='CORPORATE USA'" ]]>


0 Karma

vikas_gopal
Builder

Please help...any solution..?

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...