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!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...