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!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...