Splunk Search

To run a search only on click of a button in the page.

asingla
Communicator

I have a submit button module containing search module and I want to execute the search only when user clicks on the button. As after search module I have to have some result module (JobProgressIndicator) for a valid view.xml but that is causing the search to run when user loads the page. Is there anyway so that search never runs when user loads the page?

Tags (1)
0 Karma

rroberts
Splunk Employee
Splunk Employee
  1. Setup autorun to false
  2. Set allowSoftSubmit param to false.

See: http://docs.splunk.com/Documentation/Splunk/4.3/Developer/ModuleReference#SubmitButton

0 Karma

Sriram
Communicator

Did it work ? I am seeing similar issue, not sure whether there is a resolution. Neither allowSoftSubmit = false and/or autoRun="false" seems to be working especially on initial load

0 Karma

savithamr
Path Finder

Yes, me too having same problem. is there any finite resolution for this.

0 Karma

sideview
SplunkTrust
SplunkTrust

Side Note: autoRun="false" does nothing. Just dont put autoRun="True". I know it's pedantic but when teams put autoRun="False" everywhere, it seems to eventually lead to there being multiple autoRun="True" attributes, which causes problems.

0 Karma

rroberts
Splunk Employee
Splunk Employee

Can you sent the entire view xml?

0 Karma

asingla
Communicator

That's what I have and it's not working.


<module name="SubmitButton">
 <param name="allowSoftSubmit">False</param>
 <param name="label">Delete</param>
 <module name="Search" autoRun="False">
   <param name="search">index=cehudlatest sys=$system$ site=$site$ mhost=$host$ appcat=$appcat$ appinst=$appinst$ | delete</param>
   <name="earliest">-10m@s</param>                                          
   <param name="latest">now</param>
   <module name="JobProgressIndicator"/>
  </module>
</module>
0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...