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

Automatic Discovery Part 1: What is Automatic Discovery in Splunk Observability Cloud ...

If you’ve ever deployed a new database cluster, spun up a caching layer, or added a load balancer, you know it ...

Real-Time Fraud Detection: How Splunk Dashboards Protect Financial Institutions

Financial fraud isn't slowing down. If anything, it's getting more sophisticated. Account takeovers, credit ...

Splunk + ThousandEyes: Correlate frontend, app, and network data to troubleshoot ...

 Are you tired of troubleshooting delays caused by siloed frontend, application, and network data? We've got a ...