All Apps and Add-ons

How to create Splunk Dashboard panel display depending on user input using tokens

sajalbansal2
Explorer

Hi All,
I want to display a panel depending on the value clicked by a user from a table of results. Let me explain the problem with below example:

Say I have a dashboard which lists top 3 products sold and their related figures.

Panel 1 = top 3 products sold. (let products names be A, B and C)

Panel 2 = this is an interactive panel which displays sales figures and more information about product A, only when a user clicks on the product A event from panel 1.

Panel 3 = this is an interactive panel which displays sales figures and more information about product B, only when a user clicks on the product B event from panel 1.

Panel 4 = this is an interactive panel which displays sales figures and more information about product C, only when a user clicks on the product C event from panel 1.

This means at a time my dashboard would display only 2 panels, panel 1 and panel 2 or 3 or 4 (depending on the product event clicked by the user).

My approach to solve this:
I am trying to use drilldown on panel 1 to capture the clicked value from it and storing it in a token.
Then I am using <condition> to match the value captured in that token to set and unset tokens related to panels 2, 3 and 4.
Then I'm using these tokens to show (depends) and hide (rejects) panels 2,3 and 4.

Doing this, I'm getting warnings such as "<set> is not allowed in condition-drilldown block" etc.
Can anyone please guide me on how to solve this problem?

Thanks,
Sajal

Labels (1)
Tags (3)
0 Karma

sajalbansal2
Explorer

Below is the code that I have recently edited. I suppose it will try to give an idea of what I want to achieve. Although, this is not working:

<drilldown>
<set token="catch_value">$click.value$</set>

<eval>
   if("$catch_value$"=='productA',<set token="showpanelofA">true</set>,<unset  token="showpanelofA">true</unset>)
</eval>

<eval>
    if("$catch_value$"=='productB',<set token="showpanelofB">true</set>,<unset token="showpanelofB">true</unset>)
</eval>

<eval>
if("$catch_value$"=='productC',<set token="showpanelofC">true</set>,<unset token="showpanelofC">true</unset>)
</eval>

</drilldown>

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!

Observability Simplified: Combining User Experience, Application Performance & ...

Tech Talk Observability Simplified: Combining User Experience, Application Performance & Network ...

Event Series May & June: From Network Visibility to Service Intelligence

Unifying the Network: Moving from Alert Noise to Service Intelligence with Splunk ITSI In today’s hybrid ...

Global Splunk User Group Events: May + June 2026

Your Splunk Community Awaits: Discover Upcoming User Group Events Worldwide    Staying ahead in the fast-paced ...