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
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

A Four-Part Event Series: Full Stack Observability For the AI Era

As AI reshapes applications, infrastructure, and the way teams operate, the traditional boundaries of ...

SOC4Kafka - New Kafka Connector Powered by OpenTelemetry

The new SOC4Kafka connector, built on OpenTelemetry, enables the collection of Kafka messages and forwards ...

Event Series: Level up your SOC: Advancing with Splunk Enterprise Security

AI has fundamentally raised the stakes for security operations, and this three-part series is your guide to ...