Splunk Search

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

Mubarish
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

martin_mueller
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

Mubarish
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

martin_mueller
SplunkTrust
SplunkTrust

Sounds like you actually need three links to different dashboards.

0 Karma

Mubarish
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
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...