Splunk Search

How to append a query based on a variable chosen from a drop-down form?

sumyatnoepwint
New Member

I need to append the query based on the defined variable.

  1. I declared a variable for the drop-down using token="TEST"
  2. I used $TEST in the query for a panel. What I want to do is like the following; if $TEST == "E1" query1 else query 2

Please let me know whether it is possible in XML or in a search.

0 Karma

frobinson_splun
Splunk Employee
Splunk Employee

Hi @sumyatnoepwint,
I believe the "condition" element should help you handle various input selections. See
http://docs.splunk.com/Documentation/Splunk/6.5.0/Viz/PanelreferenceforSimplifiedXML#condition_.28in...

You can also check out the form input examples in the Dashboard Examples App
https://splunkbase.splunk.com/app/1603/

Hope this helps!

0 Karma
Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...