Splunk Search
Highlighted

How to run three different searches on click of a submitbutton?

Path Finder

Hi

How to run three different searches on click of a submitbutton? The scenario to choose a particular search will be the radio button selection.

Tags (2)
0 Karma
Highlighted

Re: How to run three different searches on click of a submitbutton?

SplunkTrust
SplunkTrust

Here's a fairly crude way to achieve this:

<form>
  <fieldset submitButton="true">
    <input type="radio" token="choice">
      <choice value="| stats count | eval search = &quot;search 1&quot;">Search 1</choice>
      <choice value="| stats count | eval search = &quot;search 2&quot;">Search 2</choice>
      <choice value="| stats count | eval search = &quot;search 3&quot;">Search 3</choice>
    </input>
  </fieldset>
  <row>
    <table>
      <searchString>$choice$</searchString>
    </table>
  </row>
</form>
0 Karma
Highlighted

Re: How to run three different searches on click of a submitbutton?

Path Finder

hi martin
on clicking the radio button form inputs has to display, user has to provide the inputs and the search result should be based on the form inputs.
on moving to the next radio button table should become empty (ie) table should not show any previous searches. how can i do this?

0 Karma
Highlighted

Re: How to run three different searches on click of a submitbutton?

SplunkTrust
SplunkTrust

Sounds like you actually need three links to different dashboards.

0 Karma
Highlighted

Re: How to run three different searches on click of a submitbutton?

Path Finder

yes like if a radio button is selected form inputs,search button and panel has to display . on clicking the search button, search corresponds to that radio button has to execute and the result has to display in the table. same senario holds good for other radio button.

0 Karma