Dashboards & Visualizations

Dynamically populate dashboard panel title

bt149
Path Finder

I have a dashboard that has 3 Inputs - "Change Type", time and text box.
The "Change Type" is dynamically populated using "choice value" based on a search string. There are two change types, Config and Admin.
Example:
<form theme="dark">
<label>Admin and Config Change Reports</label>
<description>Change Events</description>
<fieldset submitButton="true" autoRun="false">
<input type="dropdown" token="tok_change" searchWhenChanged="true">
<label>Change Type:</label>
<choice value="index=admin_changes <some other spl>">Admin change</choice>
<choice value="index=config_changes <some other spl>">Config change</choice>

The users much choose from a drop down, one of the above change choices. Once the choice is made a table is populated with the results.

What I want to do is when the panel (table) is populated I want the "change type" to be the panel title.

Thanks in advance.

Labels (1)
0 Karma
1 Solution

somesoni2
SplunkTrust
SplunkTrust

Try something like this

<form .....
  <fieldset submitButton="false">
    <input type="dropdown" token="configType">
      <label>Config Type</label>
      <choice value="value1">Admin Change</choice>
      <choice value="value2">Config Change</choice>
      <change>
        <condition>
          <set token="panelTitle">$label$</set>
        </condition>
      </change>
    </input>
  </fieldset>
  <row>
    <panel>
      <title>Showing data for $panelTitle$</title>
......

View solution in original post

0 Karma

somesoni2
SplunkTrust
SplunkTrust

Try something like this

<form .....
  <fieldset submitButton="false">
    <input type="dropdown" token="configType">
      <label>Config Type</label>
      <choice value="value1">Admin Change</choice>
      <choice value="value2">Config Change</choice>
      <change>
        <condition>
          <set token="panelTitle">$label$</set>
        </condition>
      </change>
    </input>
  </fieldset>
  <row>
    <panel>
      <title>Showing data for $panelTitle$</title>
......
0 Karma

bt149
Path Finder

Thank you.  Worked like a charm.

0 Karma
Get Updates on the Splunk Community!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...