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!

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 ...