Splunk Search

Change command is not working for checkbox

madakkas
Explorer

HI,

I am trying to assign values to the token based on the values selected in the check box.
If label="All" then I am assigning new token " t1=show all files" but this value is not been displayed in the Title .
It is displaying "$t1$" as title
But if use $Shift$ in the Title then it is showing the Values based on the checkbox clicked
Please help me in finding out the reason value is not displayed for $t1$

<input type="checkbox" token="Shift" searchWhenChanged="true">
  <label>Shift</label>
  <choice value="*">All</choice>
  <choice value="Batch Mode">Batch</choice>
  <choice value="Online Mode">Afternoon</choice>
  <default>All</default>
 <change>
    <condition label="All">
        <set token="t1">show all files</set>
        <set token="t2">testing</set>
   </condition>
  </change>
 </fieldset>

<panel>
      <title>"$t1$"</title>
Tags (1)
0 Karma

493669
Super Champion

Hi @madakkas,
Try this:

<change>
     <condition match="$Shift$==&quot;*&quot;">
         <set token="t1">show all files</set>
         <set token="t2">testing</set>
    </condition>
    <condition>
          <unset token="t1"></unset>
          <unset token="t2"></unset>
        </condition>
   </change>
0 Karma

tiagofbmm
Influencer

Hey

Checkboxes values passed to other panels is a known issue that you can find help for in this question:

https://answers.splunk.com/answers/314505/how-to-pass-selected-checkbox-values-to-drilldown.html

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

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...