Dashboards & Visualizations

How to display table headers based on form input?

john_dagostino
Path Finder

I'm looking for a way to display a table based on a dropdown input in a dashboard. For example, if I choose "ASA" as the sourcetype, I want the table to only display the fields _time, host, src dest but if I choose "Infoblox" then I want the table to display _time, dhcpresponse, dnsquery, etc. Is there a way to do this in simple XML?

0 Karma
1 Solution

woodcock
Esteemed Legend

Do it like this:

<fieldset>
<input type="dropdown" token="fields_by_sourcetype_token">
  <label>Fields by Sourcetype</label>
  <choice value="_time host src dest ">ASA</choice>
  <choice value="_time dhcpresponse dnsquery">Infoblox</choice>
  <default>ASA</default>
</input>

Then do this:

<searchString>Blah BLAH BlAh | table $fields_by_sourcetype_token$</searchString>

View solution in original post

0 Karma

woodcock
Esteemed Legend

Do it like this:

<fieldset>
<input type="dropdown" token="fields_by_sourcetype_token">
  <label>Fields by Sourcetype</label>
  <choice value="_time host src dest ">ASA</choice>
  <choice value="_time dhcpresponse dnsquery">Infoblox</choice>
  <default>ASA</default>
</input>

Then do this:

<searchString>Blah BLAH BlAh | table $fields_by_sourcetype_token$</searchString>
0 Karma

john_dagostino
Path Finder

You rock!

0 Karma
Get Updates on the Splunk Community!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...