Dashboards & Visualizations

Dashboard CMD execution

markhvesta
Path Finder

I have 2 commands I would like to execute in a dashboard only when the input checkbox is marked and submit is hit. Currently it just attempts to execute both of these when the page is loaded. Can someone please tell me what I am doing wrong?

<fieldset submitButton="true" autoRun="false">
    <input type="checkbox" token="dummy" searchWhenChanged="false">
      <label>CMD1</label>
      <choice value="run">Run</choice>
        <search>
          <query>| cmd1 | eval ignore = $form.tokQuery$</query>
        </search>
      <delimiter> </delimiter>
      <change>
        <set token="form.tokQuery">nothing</set>
      </change>
    </input>
    <input type="checkbox" token="dummy2" searchWhenChanged="false">
      <label>CMD2</label>
      <choice value="run">Run</choice>
      <search>
        <query>| cmd2 | eval ignore = $form.tokQuery$</query>
      </search>
      <delimiter> </delimiter>
    </input>
  </fieldset>
0 Karma

to4kawa
Ultra Champion

You should send the selected result (token run) to the main panel (in this case, the hidden panel).

markhvesta
Path Finder

Can you please clarify how?

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...