Dashboards & Visualizations

Using a drop-down to populate dashboard panels, how to get the static names as the panel titles and the associated values to populate the searches?

pepper_seattle
Path Finder

Overview
I have a dashboard with multiple panels affected by a drop-down menu. The drop-down menu has static options, so names and associated values that have been manually entered. Need to get the names of the static options (names which appear in the drop-down menu as options) onto the panel titles, but Splunk will place the static values instead when the menu's token is placed in the panel title.

Question
How do I get the names for each static option (not the values) to appear when selected on the affected panels?

Example
Token: tok
Name: Mobile
Value: device="smrtphone" OR device="tblt"

<title>$tok$ Revenue</title> 

Comes out as: device="smrtphone" OR device="tblt" Revenue

0 Karma
1 Solution

jeffland
SplunkTrust
SplunkTrust

In the Simple XML of the dashboard, you need to set another token which contains the label. Should look something like this:

<input type=...>
  <choice>...</choice>
  ...
  <default>...</default>
  <change>
    <set token="token_label">$label$</set>
  </change>

Now you can use $token_label$ in the title of your view, and it should display the label of the currently selected option.

View solution in original post

0 Karma

jeffland
SplunkTrust
SplunkTrust

In the Simple XML of the dashboard, you need to set another token which contains the label. Should look something like this:

<input type=...>
  <choice>...</choice>
  ...
  <default>...</default>
  <change>
    <set token="token_label">$label$</set>
  </change>

Now you can use $token_label$ in the title of your view, and it should display the label of the currently selected option.

0 Karma

dolivasoh
Contributor

This works for me when the token value and label are the same, but of course it does. Would also like to know how to differentiate between the two as I haven't experimented with using the name. I assume it's not possible, The name is simply for aesthetics, I think.

0 Karma

Suryadeep
New Member

can somebody show an example for this?

0 Karma
Get Updates on the Splunk Community!

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...

Updated Data Management and AWS GDI Inventory in Splunk Observability

We’re making some changes to Data Management and Infrastructure Inventory for AWS. The Data Management page, ...

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...