Dashboards & Visualizations

set tokens in one dashboard and transfer to another

cannstatt
Explorer

Hi guys

I want to set tokens in one dashboard and link to another dashboard by use the drilldown option.
I use the drilldown option with a single value panel which is just showing a text quot.

The link to the other dashboard works but in there splunk always uses the value in the anel for the tokens. I want to use the set tokens in thr first dashboard.

Here is my code:

<form>
<label>Test Case</label>
<fieldset submitButton="false">
<input type="dropdown" token="building" searchWhenChanged="true">
<label>RZ Building</label>
<fieldForLabel>RZ_Building</fieldForLabel>
<fieldForValue>RZ_Building</fieldForValue>
<search>
<query>index=pdu_de RZ_Building=* | dedup RZ_Building</query>
<earliest>-24h@h</earliest>
<latest>now</latest>
</search>
</input>
<input type="dropdown" token="room">
<label>Room</label>
<fieldForLabel>RZ_Room</fieldForLabel>
<fieldForValue>RZ_Room</fieldForValue>
<search>
<query>index=pdu_de RZ_Building=$building$ RZ_Room=* | dedup RZ_Room | sort RZ_Room</query>
<earliest>-24h@h</earliest>
<latest>now</latest>
</search>
</input>
</fieldset>
<row>
<panel>
<single>
<search>
<query>| makeresults
| eval text1= "Blue PDU"
| fields - _time</query>
<earliest>-24h@h</earliest>
<latest>now</latest>
</search>
<option name="drilldown">all</option>
<option name="refresh.display">progressbar</option>
<drilldown>
<link target="_blank">/app/pdu_dev/geist_pdu_poc?form.building=$click.value$&amp;form.room=$click.value$</link>
</drilldown>
</single>
</panel>
</row>
</form>

Labels (2)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

Using $click.foo$ will send the value of field "foo" from the results to the drilldown dashboard.  To send a token, use that token's name in the drilldown.

<drilldown>
<link target="_blank">/app/pdu_dev/geist_pdu_poc?form.building=$building$&amp;form.room=$click.value$</link>
</drilldown>

 

---
If this reply helps you, Karma would be appreciated.

FelixLeh
Contributor

Hi its me again from your other post! If you want to use the Drilldown on the same dashboard as the single value text then you select "manage token on dashboard" in edit drilldown instead of "link to dashboard" and you don't have to use "form." in front of the token in that case.. 
From the code you posted I get the feeling you mean you want to pass a token to another panel in the same Dashboard? "Link to another dashboard" and "form." only needs to be used when you want to link to a completely different Dashboard in your environment

0 Karma

cannstatt
Explorer

Hi FelixLeh

I want to link a complete different dashboard.

I want to set the tokens in the first dashboard and use the set values in the second one.
The second dashboard has the same token names as the first one.

For example: when I set for building in the first dashboard "520" how can I transfer the tokens value to the second dashboard. There I want to have the "520" shown in the building token as well.

0 Karma

FelixLeh
Contributor

If you use your Drilldown to the second Dashboard does it show the value of the clicked value in the URL of the Dashboard or the fieldname?

0 Karma

cannstatt
Explorer

In the second dashboard it just shows "$click.value$" in the token instead of the set token value in the first dashboard.

0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

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

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...