All Apps and Add-ons

Sideview Util - Search is running before selection is complete

lain179
Communicator

Hi,

I have a view where a user have to input three values before a report is created. The user must first select a report type, and then host type and the host name. The problem is the search is executing every time something changes and keep refreshing the message saying "No results found".

For example, after the user selects the report type from a Pulldown, the host type field is populated for the user. At the same time the search is already executed and the page displays "No results found". Then the user selects the host type, and the search gets executed again with the result of "No results found". It's very annoying.

I don't want the search to execute until after the user has input ALL three values. How can I control that? May be there is a way to put a "GO" button that the search will execute only when the user hits GO? Examples will be great.

Thanks!

1 Solution

sideview
SplunkTrust
SplunkTrust

The easiest way is to put a Button module up there, and set the "allowSoftSubmit" param to False.

You just put this downstream from your Pulldowns. Setting allowSoftSubmit to False will prevent the upstream changes from going through, and then the main search(es) will only dispatch when the user clicks the Button.

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

If you want it to be more clever, and you don't want a green button up there, you can use the Gate module. Make sure that the "unselected" entries of the Pulldowns have null values, and then put this directly downstream from your third Pulldown. Also let's say that the name params for your Pulldowns are "pulldown1", "pulldown2", and "pulldown3"

<module name="Gate">
  <param name="requiredKeys">pulldown1,pulldown2,pulldown3</param>

The Gate module thus configured will not let any push pass downstream until all three of those keys have a value. So if the user sets the first Pulldown, then the second, then the Third, the main search(es) will all automatically dispatch only when they pick the third. If they then change the first Pulldown, the main search(es) will dispatch again, etc...

(Note that the Gate module only came out in Sideview Utils 2.4.8)

http://sideviewapps.com/apps/sideview-utils

View solution in original post

sideview
SplunkTrust
SplunkTrust

The easiest way is to put a Button module up there, and set the "allowSoftSubmit" param to False.

You just put this downstream from your Pulldowns. Setting allowSoftSubmit to False will prevent the upstream changes from going through, and then the main search(es) will only dispatch when the user clicks the Button.

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

If you want it to be more clever, and you don't want a green button up there, you can use the Gate module. Make sure that the "unselected" entries of the Pulldowns have null values, and then put this directly downstream from your third Pulldown. Also let's say that the name params for your Pulldowns are "pulldown1", "pulldown2", and "pulldown3"

<module name="Gate">
  <param name="requiredKeys">pulldown1,pulldown2,pulldown3</param>

The Gate module thus configured will not let any push pass downstream until all three of those keys have a value. So if the user sets the first Pulldown, then the second, then the Third, the main search(es) will all automatically dispatch only when they pick the third. If they then change the first Pulldown, the main search(es) will dispatch again, etc...

(Note that the Gate module only came out in Sideview Utils 2.4.8)

http://sideviewapps.com/apps/sideview-utils

lain179
Communicator

Thank you!

0 Karma
Get Updates on the Splunk Community!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...