Dashboards & Visualizations

Need to pass caption name of the single value panel as a token

manish_singh_77
Builder

Hi All,

I am trying to pass caption name as a token value in another dashboard into form text, is it possible?

0 Karma

niketn
Legend

Since your Single Values are static it implies the caption you have used for each of your single values are also static. So what you need to do is the pass the same static caption when any of your Single Value is clicked (which you already know as they are hard-coded in Simple XML).

Refer to the following run anywhere example where I have created a Single Value with static Caption Exception and passed the same to token (please try and confirm):

  <row>
    <panel>
      <single>
        <search>
          <query>| makeresults
| eval Events=random()</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
          <sampleRatio>1</sampleRatio>
        </search>
        <option name="colorBy">value</option>
        <option name="colorMode">none</option>
        <option name="drilldown">all</option>
        <option name="numberPrecision">0</option>
        <option name="rangeColors">["0x53a051","0x0877a6","0xf8be34","0xf1813f","0xdc4e41"]</option>
        <option name="rangeValues">[0,30,70,100]</option>
        <option name="showSparkline">1</option>
        <option name="showTrendIndicator">1</option>
        <option name="trellis.enabled">0</option>
        <option name="trellis.scales.shared">1</option>
        <option name="trellis.size">medium</option>
        <option name="trendColorInterpretation">standard</option>
        <option name="trendDisplayMode">absolute</option>
        <option name="underLabel">Exceptions</option>
        <option name="unitPosition">after</option>
        <option name="useColors">0</option>
        <option name="useThousandSeparators">0</option>
        <drilldown>
          <set token="tokValue">$click.value2$</set>
          <set token="tokCaption">Exception</set>
        </drilldown>
      </single>
      <html>
        <div>
          <div>tokValue: $tokValue$</div>
          <div>tokCaption: $tokCaption$</div>
        </div>
      </html>
    </panel>
  </row>

PS: Trellis or Token based caption could have give your Dynamic Single Values/Captions.

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma

niketn
Legend

@manish_singh_777 have you tried something like the following where form.field1 or $singleValueCaption$ is the token passed from another dashboard:

    <option name="underLabel">$form.field1$</option>

Or an indirect token if you are processing using a hidden fields.

    <option name="underLabel">$singleValueCaption$</option>

Please try out and confirm

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma

manish_singh_77
Builder

@niketnilay

It is not working, I am trying to pass the SingleValue Panel name as a token value in the different dashboard. And that value would be used in form text in another dashboard.

0 Karma
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...