Dashboards & Visualizations

how to disable autoRun when switching tabs?

dianbo_1
Path Finder

Hi,

I has a form search with a tabswitcher to show the result in 4 tabs. I set autoRun="False" to all modules to disable default autoRun. It's OK when the page loads at the first time, but when i click other tab, it will autoRun. Can anyone tell me how to disable autoRun when switching tabs before clicking ">" button.

Thanks,

Dianbo

0 Karma

sideview
SplunkTrust
SplunkTrust

When you switch tabs it's not autoRun that's causing the searches to kick off, it's just the fact that the Switcher module itself is holding onto an undispatched search, and when you switch the tabs it "pushes" its data down to the downstream modules. And when an undispatched search hits a module that actually needs a running search, a new search will always be kicked off.

In some circumstances its possible to rework the view such that at the place where the switcher module is in the hierarchy, the search has already been dispatched, ie by putting a SimpleResultsHeader or some other module above the switcher module. If that can be done then you can get only one search being kicked off for the entire set of tabs.

However, that doesnt sound like the case you have here, judging by your mention of the ">" button.
Interpreting that comment to mean that you have a SubmitButton module in there underneath the switcher, and you want the tab switch to result in no search kicked off, but then the green button click to result in a search being kicked off, then you'll want to give the SubmitButton a param of

<param name="allowSoftSubmit">False</param>

that param defaults to True I believe, and when True it means that whenever new data comes down through the SubmitButton, it will let it through, and searches may get dispatched. When set to False, it will block pushes from reaching downstream modules, until a user actually clicks on the green button.

hth.

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, ...