Dashboards & Visualizations

Checkbox value to another token with searchWhenChanged=false

JykkeDaMan
Path Finder

I cannot make this work if I have the searchWhenChanged=false. I would like to set the token and do the search only after Submit button is pressed.

 

 

<form script="simple_xml_examples:showtokens.js">
  <label>Set another token by checkbox value</label>
  <fieldset submitButton="true">
    <input type="checkbox" token="checked" searchWhenChanged="false">
      <choice value="yes">Check for yes</choice>
      <change>
        <condition value="yes">
          <eval token="checked_result_value">if(true(), $form.checked$, "never_here"</eval>
        </condition>
        <condition>
          <eval token="checked_result_value">"NotChecked"</eval>
        </condition>
      </change>
    </input>
  </fieldset>
  <row>
    <panel>
      <single>
        <search>
          <query>| makeresults | eval value="$checked_result_value$"</query>
        </search>
      </single>
    </panel>
  </row>
</form>

 

Labels (1)
0 Karma
Get Updates on the Splunk Community!

[Puzzles] Solve, Learn, Repeat: Dynamic formatting from XML events

This challenge was first posted on Slack #puzzles channelFor a previous puzzle, I needed a set of fixed-length ...

Enter the Agentic Era with Splunk AI Assistant for SPL 1.4

  &#x1f680; Your data just got a serious AI upgrade — are you ready? Say hello to the Agentic Era with the ...

Stronger Security with Federated Search for S3, GCP SQL & Australian Threat ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...