Dashboards & Visualizations

Dashboard dynamic search string in a panel

vikashumble
Explorer

Hello, 

I have a dashboard with couple of pie charts and a summary table. First Pie chart sets token 1, second token 2 and so on. I was wondering if there is any way in which I can refresh the summary table with the token values selected?

In other words, if token 1 is set but token 2 is unset, then

BASE SEARCH | search token1=$token1$, token2=* (since token 2 is not set yet)

If token 1 and token 2 is set, then 

BASE SEARCH | search token1=$token1$, token2=$token2$ (as both tokens are set.

Eventually what I am trying to do is keep refreshing the dashboard based on user clicks, but if at the moment, unless user sets the token1 and token2, my dashboard panel is not showing anything. It is stuck at "waiting for user input".  

Labels (3)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust

You can create and init block at the top of the dashboard source to set your token on dashboard load

<init>
  <set token="token1">*</set>
  <set token="token2">*</set>
</init>

View solution in original post

ITWhisperer
SplunkTrust
SplunkTrust

You can create and init block at the top of the dashboard source to set your token on dashboard load

<init>
  <set token="token1">*</set>
  <set token="token2">*</set>
</init>
Get Updates on the Splunk Community!

.conf25 Community Recap

Hello Splunkers, And just like that, .conf25 is in the books! What an incredible few days — full of learning, ...

Splunk App Developers | .conf25 Recap & What’s Next

If you stopped by the Builder Bar at .conf25 this year, thank you! The retro tech beer garden vibes were ...

Congratulations to the 2025-2026 SplunkTrust!

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