Dashboards & Visualizations

How to display dynamic values in the panel title?

Jouman
Path Finder

Hi All,

Previously, I have asked a question titled as "How to display panels dynamically depends on selection?"
https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-panels-dynamically-depends-...  

The panels can be displayed dynamically by the user selection.

However, I need to display the title or the description according to the dymical selection.

That is, if the user select packet_size="32,40,128" from the filter.

Three panels will be displayed and I wish to display the title = "Packet size=xx", where xx represent the analyzed packet_size value.  

ex. Table 1 with title = "Packet size=32", Table 2 with title = "Packet size=40", Table 3 with title = "Packet size=128"


I refer to these history but I am unable to find a successful solution.

How do I display _time on dashboard panel's title field? 
Dynamic value display in the Panel Title? 
How do you display the date in a dashboard title? 

Does anyone know how to display the title or description with a variable in code or a value in filter selection?

Thank you so much.

Labels (4)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
<form version="1.1">
  <label>Multiselect</label>
  <fieldset submitButton="false" autoRun="true">
    <input type="multiselect" token="packetsize" searchWhenChanged="true">
      <label>Packet Size</label>
      <search>
        <query>
          ``` Query to generate packet sizes dynamially ```
          | makeresults
          | eval packetsize=split("40,128,520",",")
          | mvexpand packetsize
        </query>
      </search>
      <fieldForValue>packetsize</fieldForValue>
      <fieldForLabel>packetsize</fieldForLabel>
      <delimiter>,</delimiter>
      <change>
        <eval token="firstpacketsize">mvindex('form.packetsize',0)</eval>
        <eval token="secondpacketsize">mvindex('form.packetsize',1)</eval>
        <eval token="thirdpacketsize">mvindex('form.packetsize',2)</eval>
        <eval token="fourthpacketsize">mvindex('form.packetsize',3)</eval>
        <eval token="fifthpacketsize">mvindex('form.packetsize',4)</eval>
      </change>
    </input>
  </fieldset>
  <row>
    <panel depends="$firstpacketsize$">
      <title>Packet size = $firstpacketsize$</title>
      <table>
        <search>
          <query>
            ``` Query to generate results based on packet size ```
            | makeresults
            | eval packetsize="$firstpacketsize$"
          </query>
        </search>
        <option name="drilldown">cell</option>
      </table>
    </panel>
    <panel depends="$secondpacketsize$">
      <title>Packet size = $secondpacketsize$</title>
      <table>
        <search>
          <query>
            ``` Query to generate results based on packet size ```
            | makeresults
            | eval packetsize="$secondpacketsize$"
          </query>
        </search>
      </table>
    </panel>
    <panel depends="$thirdpacketsize$">
      <title>Packet size = $thirdpacketsize$</title>
      <table>
        <search>
          <query>
            ``` Query to generate results based on packet size ```
            | makeresults
            | eval packetsize="$thirdpacketsize$"
          </query>
        </search>
      </table>
    </panel>
    <panel depends="$fourthpacketsize$">
      <title>Packet size = $fourthpacketsize$</title>
      <table>
        <search>
          <query>
            ``` Query to generate results based on packet size ```
            | makeresults
            | eval packetsize="$fourthpacketsize$"
          </query>
        </search>
      </table>
    </panel>
    <panel depends="$fifthpacketsize$">
      <title>Packet size = $fifthpacketsize$</title>
      <table>
        <search>
          <query>
            ``` Query to generate results based on packet size ```
            | makeresults
            | eval packetsize="$fifthpacketsize$"
          </query>
        </search>
      </table>
    </panel>
  </row>
</form>
0 Karma
Get Updates on the Splunk Community!

Observability Unlocked: Kubernetes Monitoring with Splunk Observability Cloud

 Ready to master Kubernetes and cloud monitoring like the pros? Join Splunk’s Growth Engineering team for an ...

Update Your SOAR Apps for Python 3.13: What Community Developers Need to Know

To Community SOAR App Developers - we're reaching out with an important update regarding Python 3.9's ...

October Community Champions: A Shoutout to Our Contributors!

As October comes to a close, we want to take a moment to celebrate the people who make the Splunk Community ...