Dashboards & Visualizations

Search a yes/no field with a single checkbox token

altink
Builder

Dear All,

I have a YES/NO field named "FIELD2" which I want to search with a single checkbox token named "Checkbox1" , in the following way:

Checkbox1.checked = TRUE   
search:  index=db FIELD1= FIELD2="YES"

Checkbox2.checked = FALSE  
search:  index=db FIELD1= FIELD2="*"
or better
search:  index=db FIELD1=

I tried with condition and match but no result.

Can someone advise "from scratch"?

best regards
Altin

Tags (2)
0 Karma

altink
Builder

I open the search loop button and see the whole search in a new Search form. there I can see how the token2 comes, and also from the result itself

0 Karma

altink
Builder

Splunk Version
6.5.2

0 Karma

Vijeta
Influencer

I am not sure why its not working, you can try to unset the values of token in finalization event of search.
I am using this to view the values of token-

test_db1

<input type="checkbox" token="checkbox1" searchWhenChanged="true">
  <label></label>

  <choice value="YES">On</choice>
  <change>
    <condition match="$checkbox1$==&quot;YES&quot;">
      <eval token="token2">"YES"</eval>
      <!--<unset token="checkbox1"></unset>-->
    </condition>
    <condition>
      <eval token="token2">"*"</eval>
    </condition>
  </change>
  <delimiter> </delimiter>



</input>


<panel>
  <title>"$token2$"</title>
        <search>
    <query>|makeresult|eval a=1|table a</query>
  </search>
</panel>
0 Karma

altink
Builder

I pasted the checkbox as from above, it still works in the opposite.

regards
Altin

0 Karma

Vijeta
Influencer

It should not happen that way, did you try clearing the browser cache ?

0 Karma

altink
Builder

I tried with another browser, still the same result - opposite of what should be.

regards
Altin

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Index This | What travels the world but is also stuck in place?

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

Discover New Use Cases: Unlock Greater Value from Your Existing Splunk Data

Realizing the full potential of your Splunk investment requires more than just understanding current usage; it ...

Continue Your Journey: Join Session 2 of the Data Management and Federation Bootcamp ...

As data volumes continue to grow and environments become more distributed, managing and optimizing data ...