Splunk Search

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

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

Splunk Employee
Splunk Employee

Hi @sumyatnoepwint,
I believe the "condition" element should help you handle various input selections. See

You can also check out the form input examples in the Dashboard Examples App

Hope this helps!

0 Karma