Dashboards & Visualizations

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

Hi All,

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

0 Karma


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):

          <query>| makeresults
| eval Events=random()</query>
        <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>
          <set token="tokValue">$click.value2$</set>
          <set token="tokCaption">Exception</set>
          <div>tokValue: $tokValue$</div>
          <div>tokCaption: $tokCaption$</div>

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

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


@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


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
Don’t Miss Global Splunk
User Groups Week!

Free LIVE events worldwide 2/8-2/12
Connect, learn, and collect rad prizes
and swag!