<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Set token value for unchecked box? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Set-token-value-for-unchecked-box/m-p/294557#M18698</link>
    <description>&lt;P&gt;Added example of doing this with a checkbox, despite it potentially not being the best tool for the job.&lt;/P&gt;</description>
    <pubDate>Thu, 15 Feb 2018 03:59:51 GMT</pubDate>
    <dc:creator>micahkemp</dc:creator>
    <dc:date>2018-02-15T03:59:51Z</dc:date>
    <item>
      <title>Set token value for unchecked box?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Set-token-value-for-unchecked-box/m-p/294555#M18696</link>
      <description>&lt;P&gt;I'm trying to set a token value for an unchecked box. I want it to be such that when it's clicked, it has value A, and when it is unchecked it has value B. &lt;/P&gt;

&lt;P&gt;Is there a way to do this without involving javascript? &lt;/P&gt;</description>
      <pubDate>Thu, 15 Feb 2018 00:13:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Set-token-value-for-unchecked-box/m-p/294555#M18696</guid>
      <dc:creator>matstap</dc:creator>
      <dc:date>2018-02-15T00:13:24Z</dc:date>
    </item>
    <item>
      <title>Re: Set token value for unchecked box?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Set-token-value-for-unchecked-box/m-p/294556#M18697</link>
      <description>&lt;P&gt;It sounds like you would be better served using a dropdown, if there are two choices that aren’t essentially true or false.&lt;/P&gt;

&lt;P&gt;But, you can accomplish this with a checkbox, as this run-anywhere example shows:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;form&amp;gt;
  &amp;lt;label&amp;gt;Set value by checkbox&amp;lt;/label&amp;gt;
  &amp;lt;fieldset submitButton="false"&amp;gt;
    &amp;lt;input type="checkbox" token="checked" searchWhenChanged="true"&amp;gt;
      &amp;lt;label&amp;gt;&amp;lt;/label&amp;gt;
      &amp;lt;choice value="yes"&amp;gt;Check for A&amp;lt;/choice&amp;gt;
      &amp;lt;delimiter&amp;gt; &amp;lt;/delimiter&amp;gt;
      &amp;lt;change&amp;gt;
        &amp;lt;condition value="yes"&amp;gt;
          &amp;lt;eval token="checked_result_value"&amp;gt;"A"&amp;lt;/eval&amp;gt;
        &amp;lt;/condition&amp;gt;
        &amp;lt;condition&amp;gt;
          &amp;lt;eval token="checked_result_value"&amp;gt;"B"&amp;lt;/eval&amp;gt;
        &amp;lt;/condition&amp;gt;
      &amp;lt;/change&amp;gt;
    &amp;lt;/input&amp;gt;
  &amp;lt;/fieldset&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;single&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;| makeresults | eval value="$checked_result_value$"&amp;lt;/query&amp;gt;
        &amp;lt;/search&amp;gt;
      &amp;lt;/single&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/form&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 15 Feb 2018 02:06:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Set-token-value-for-unchecked-box/m-p/294556#M18697</guid>
      <dc:creator>micahkemp</dc:creator>
      <dc:date>2018-02-15T02:06:30Z</dc:date>
    </item>
    <item>
      <title>Re: Set token value for unchecked box?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Set-token-value-for-unchecked-box/m-p/294557#M18698</link>
      <description>&lt;P&gt;Added example of doing this with a checkbox, despite it potentially not being the best tool for the job.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Feb 2018 03:59:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Set-token-value-for-unchecked-box/m-p/294557#M18698</guid>
      <dc:creator>micahkemp</dc:creator>
      <dc:date>2018-02-15T03:59:51Z</dc:date>
    </item>
    <item>
      <title>Re: Set token value for unchecked box?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Set-token-value-for-unchecked-box/m-p/294558#M18699</link>
      <description>&lt;P&gt;This is what I was looking for. Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 15 Feb 2018 20:06:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Set-token-value-for-unchecked-box/m-p/294558#M18699</guid>
      <dc:creator>matstap</dc:creator>
      <dc:date>2018-02-15T20:06:47Z</dc:date>
    </item>
  </channel>
</rss>

