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.
Get Updates on the Splunk Community!

Data Persistence in the OpenTelemetry Collector

This blog post is part of an ongoing series on OpenTelemetry. What happens if the OpenTelemetry collector ...

Introducing Splunk 10.0: Smarter, Faster, and More Powerful Than Ever

Now On Demand Whether you're managing complex deployments or looking to future-proof your data ...

Community Content Calendar, September edition

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