Dashboards & Visualizations

How to load some panels only when everything is loaded or load them only when a checkbox is selected.

macadminrohit
Contributor

I have three searches (tables) which show on the dashboard only when i select a check box on the top . But in the background they have already loaded. I do not want that, because that behaviour slows other panels. I only want those searches to run when the check box is selected.

Tags (1)
0 Karma
1 Solution

niketn
Legend

@macadminrohit, refer to Section 5 of this blog from Luke Murphy https://www.splunk.com/blog/2015/03/30/making-a-dashboard-with-tabs-and-searches-that-run-when-click...

You can add the checkbox token to your search to prevent the search from running when the token is not set.

One other example on similar lines would be something like the following:

<yourBaseSearch>
| <yourRemainingSearchWithStats>
| eval dummy="$<yourCheckBoxToken>$"
| fields - dummy

This does not show the field dummy in your search but adds a dependency with the token required to run the search. Hence if the Check Box is not checked your Search will keep waiting for input.

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

View solution in original post

0 Karma

niketn
Legend

@macadminrohit, refer to Section 5 of this blog from Luke Murphy https://www.splunk.com/blog/2015/03/30/making-a-dashboard-with-tabs-and-searches-that-run-when-click...

You can add the checkbox token to your search to prevent the search from running when the token is not set.

One other example on similar lines would be something like the following:

<yourBaseSearch>
| <yourRemainingSearchWithStats>
| eval dummy="$<yourCheckBoxToken>$"
| fields - dummy

This does not show the field dummy in your search but adds a dependency with the token required to run the search. Hence if the Check Box is not checked your Search will keep waiting for input.

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

renjith_nair
Legend

Hi @macadminrohit ,

If you want your searches run only after checkbox is selected, then you need to set a token on checkbox set and use it in your search so that the search will not run until that token is set.

For e.g. index=abc "other search terms" $hereismytokenfromcheckbox$

The token could be set to something which is always true so that your searches will be run as soon as the token is set

---
What goes around comes around. If it helps, hit it with Karma 🙂
0 Karma

kyaparla
Path Finder

Searches can also take depends token like the panels or rows.

search id="search1" depends="$checkbox$"

0 Karma

macadminrohit
Contributor

I have already done that but it still loads that in the background. I just don't want to load it unless I click on that check box. Here loading means , I don't even want that search to run before clicking the checkbox.

0 Karma

kyaparla
Path Finder

checkbox is little different, even when its not selected the token is value is still set to something. Token should be unset for this to work. Do unset of token during init of dashboard and test it.

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!

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas     Cisco Live 2026 is almost here, and this ...

What Is the Name of the USB Key Inserted by Bob Smith? (BOTS Hint, Not the Answer)

Hello Splunkers,   So you searched, “what is the name of the usb key inserted by bob smith?”  Not gonna lie… ...

Automating Threat Operations and Threat Hunting with Recorded Future

    Automating Threat Operations and Threat Hunting with Recorded Future June 29, 2026 | Register   Is your ...