Dashboards & Visualizations

Is there a way to uncheck the checkbox when the token associated to the checkbox is unset?

christal1989
New Member

Hi,

I have a dashboard where a user has to enter few details. Once details are entered a new panel opens displaying the data entered along with a checkbox which user has to check if data is correct. Currently after the first time user checks the checkbox, it remains checked when user needs to another different set of data. Though token is unset when user alter any of the already entered data, checkbox remains checked in the UI.

Is there a way to uncheck the checkbox when the token associated to the checkbox is unset? Or in other words is there a way to show unchecked checkbox whenever token associated to the checkbox is unset

Regards,
Chris.

Tags (1)
0 Karma

niketn
Legend

@christal1989, When your input is changed and you unset the check box token, make sure you unset the form token as well. For example

    <change>
        <unset token="tokApply"></unset>
        <unset token="form.tokApply"></unset>
    </change>

Please try out the following run anywhere example.

<form>
  <label>Uncheck CheckBox on Unset Token</label>
  <fieldset submitButton="false">
    <input type="text" token="tokText" searchWhenChanged="true">
      <label>Text</label>
      <change>
        <unset token="tokApply"></unset>
        <unset token="form.tokApply"></unset>
      </change>
    </input>
    <input type="checkbox" token="tokApply" searchWhenChanged="true">
      <label></label>
      <choice value="apply">Apply?</choice>
    </input>
  </fieldset>
  <row>
    <panel>
      <table>
        <search>
          <query>| makeresults
            | eval data="$tokText$"
            | eval dummyApply="$tokApply$"
            | fields - _time, dummyApply
          </query>
        </search>
      </table>
    </panel>
  </row>
</form>
____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
Get Updates on the Splunk Community!

Index This | What’s a riddle wrapped in an enigma?

September 2025 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with this ...

BORE at .conf25

Boss Of Regular Expression (BORE) was an interactive session run again this year at .conf25 by the brilliant ...

OpenTelemetry for Legacy Apps? Yes, You Can!

This article is a follow-up to my previous article posted on the OpenTelemetry Blog, "Your Critical Legacy App ...