<?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 How to use tokens in dashboard panel labels with checkboxes? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-use-tokens-in-dashboard-panel-labels-with-checkboxes/m-p/345947#M22530</link>
    <description>&lt;P&gt;I understand that there is a bug in using some tokens with checkboxes and the condition tags.  &lt;/P&gt;

&lt;P&gt;I want to use the value of a token that I am using for a dashboard panel label.  Here is the code for the checkbox selection:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;input type="checkbox" token="YearsAx" searchWhenChanged="true"&amp;gt;
  &amp;lt;label&amp;gt;Select Years&amp;lt;/label&amp;gt;
  &amp;lt;choice value="2017"&amp;gt;2017&amp;lt;/choice&amp;gt;
  &amp;lt;choice value="2018"&amp;gt;2018&amp;lt;/choice&amp;gt;
  &amp;lt;delimiter&amp;gt; OR &amp;lt;/delimiter&amp;gt;
  &amp;lt;prefix&amp;gt;(&amp;lt;/prefix&amp;gt;
  &amp;lt;suffix&amp;gt;)&amp;lt;/suffix&amp;gt;
  &amp;lt;valuePrefix&amp;gt;Year="&amp;lt;/valuePrefix&amp;gt;
  &amp;lt;valueSuffix&amp;gt;"&amp;lt;/valueSuffix&amp;gt;
  &amp;lt;change&amp;gt;
    &amp;lt;condition value="2017"&amp;gt;
      &amp;lt;set token="date_label"&amp;gt;2017&amp;lt;/set&amp;gt;
    &amp;lt;/condition&amp;gt;
    &amp;lt;condition value="2018"&amp;gt;
      &amp;lt;set token="date_label"&amp;gt;2018&amp;lt;/set&amp;gt;
    &amp;lt;/condition&amp;gt;
  &amp;lt;/change&amp;gt;
&amp;lt;/input&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;However, when I use $YearsAx$ for the dashboard panel label, I get this (a few examples):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Summary By Program (In Plan) (Year="2018" OR Year="2017")
Summary By Program (In Plan) (Year="2017")
Summary By Program (In Plan) (Year="2018")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The condition tags would normally be used to set a different token, but they don't seem to work with checkboxes.  &lt;/P&gt;

&lt;P&gt;How can I work around it so that I can show a proper dashboard label?  Something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; Summary By Program (In Plan) 2017 and 2018
 Summary By Program (In Plan) 2017
 Summary By Program (In Plan) 2018
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thank you!&lt;/P&gt;</description>
    <pubDate>Thu, 14 Dec 2017 21:29:12 GMT</pubDate>
    <dc:creator>aferone</dc:creator>
    <dc:date>2017-12-14T21:29:12Z</dc:date>
    <item>
      <title>How to use tokens in dashboard panel labels with checkboxes?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-use-tokens-in-dashboard-panel-labels-with-checkboxes/m-p/345947#M22530</link>
      <description>&lt;P&gt;I understand that there is a bug in using some tokens with checkboxes and the condition tags.  &lt;/P&gt;

&lt;P&gt;I want to use the value of a token that I am using for a dashboard panel label.  Here is the code for the checkbox selection:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;input type="checkbox" token="YearsAx" searchWhenChanged="true"&amp;gt;
  &amp;lt;label&amp;gt;Select Years&amp;lt;/label&amp;gt;
  &amp;lt;choice value="2017"&amp;gt;2017&amp;lt;/choice&amp;gt;
  &amp;lt;choice value="2018"&amp;gt;2018&amp;lt;/choice&amp;gt;
  &amp;lt;delimiter&amp;gt; OR &amp;lt;/delimiter&amp;gt;
  &amp;lt;prefix&amp;gt;(&amp;lt;/prefix&amp;gt;
  &amp;lt;suffix&amp;gt;)&amp;lt;/suffix&amp;gt;
  &amp;lt;valuePrefix&amp;gt;Year="&amp;lt;/valuePrefix&amp;gt;
  &amp;lt;valueSuffix&amp;gt;"&amp;lt;/valueSuffix&amp;gt;
  &amp;lt;change&amp;gt;
    &amp;lt;condition value="2017"&amp;gt;
      &amp;lt;set token="date_label"&amp;gt;2017&amp;lt;/set&amp;gt;
    &amp;lt;/condition&amp;gt;
    &amp;lt;condition value="2018"&amp;gt;
      &amp;lt;set token="date_label"&amp;gt;2018&amp;lt;/set&amp;gt;
    &amp;lt;/condition&amp;gt;
  &amp;lt;/change&amp;gt;
&amp;lt;/input&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;However, when I use $YearsAx$ for the dashboard panel label, I get this (a few examples):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Summary By Program (In Plan) (Year="2018" OR Year="2017")
Summary By Program (In Plan) (Year="2017")
Summary By Program (In Plan) (Year="2018")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The condition tags would normally be used to set a different token, but they don't seem to work with checkboxes.  &lt;/P&gt;

&lt;P&gt;How can I work around it so that I can show a proper dashboard label?  Something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; Summary By Program (In Plan) 2017 and 2018
 Summary By Program (In Plan) 2017
 Summary By Program (In Plan) 2018
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 14 Dec 2017 21:29:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-use-tokens-in-dashboard-panel-labels-with-checkboxes/m-p/345947#M22530</guid>
      <dc:creator>aferone</dc:creator>
      <dc:date>2017-12-14T21:29:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to use tokens in dashboard panel labels with checkboxes?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-use-tokens-in-dashboard-panel-labels-with-checkboxes/m-p/345948#M22531</link>
      <description>&lt;P&gt;your using the $YearAx$ token in the label, which has &lt;STRONG&gt;(Year="2017......)&lt;/STRONG&gt; defined. &lt;/P&gt;

&lt;P&gt;try something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...
&amp;lt;change&amp;gt;
     &amp;lt;condition&amp;gt;
       &amp;lt;set token="date_label"&amp;gt;$value$&amp;lt;/set&amp;gt;
     &amp;lt;/condition&amp;gt;
   &amp;lt;/change&amp;gt;
...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and use $date_label$ in the panel.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Dec 2017 21:47:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-use-tokens-in-dashboard-panel-labels-with-checkboxes/m-p/345948#M22531</guid>
      <dc:creator>cmerriman</dc:creator>
      <dc:date>2017-12-14T21:47:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to use tokens in dashboard panel labels with checkboxes?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-use-tokens-in-dashboard-panel-labels-with-checkboxes/m-p/345949#M22532</link>
      <description>&lt;P&gt;Right.  In my example above, I am using the condition tags.  I forgot to mention that I first used the $date_label$ token, but it doesn't work.  I believe that is where the bug is with using checkboxes.  Radio buttons do work, however.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Dec 2017 15:17:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-use-tokens-in-dashboard-panel-labels-with-checkboxes/m-p/345949#M22532</guid>
      <dc:creator>aferone</dc:creator>
      <dc:date>2017-12-15T15:17:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to use tokens in dashboard panel labels with checkboxes?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-use-tokens-in-dashboard-panel-labels-with-checkboxes/m-p/345950#M22533</link>
      <description>&lt;P&gt;@aferone&lt;/P&gt;

&lt;P&gt;Please try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;form&amp;gt;
  &amp;lt;label&amp;gt;testCheckbox&amp;lt;/label&amp;gt;
  &amp;lt;fieldset submitButton="false" autoRun="true"&amp;gt;
    &amp;lt;input type="checkbox" token="YearsAx" searchWhenChanged="true"&amp;gt;
      &amp;lt;label&amp;gt;Select Years&amp;lt;/label&amp;gt;
      &amp;lt;choice value="2017"&amp;gt;2017&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="2018"&amp;gt;2018&amp;lt;/choice&amp;gt;
      &amp;lt;delimiter&amp;gt; and &amp;lt;/delimiter&amp;gt;
    &amp;lt;/input&amp;gt;
  &amp;lt;/fieldset&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;title&amp;gt;Summary By Program (In Plan) $YearsAx$&amp;lt;/title&amp;gt;
      &amp;lt;event&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;index=_internal sourcetype=splunkd | head 1&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;-15m&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
        &amp;lt;/search&amp;gt;
      &amp;lt;/event&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>Fri, 15 Dec 2017 16:19:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-use-tokens-in-dashboard-panel-labels-with-checkboxes/m-p/345950#M22533</guid>
      <dc:creator>sbbadri</dc:creator>
      <dc:date>2017-12-15T16:19:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to use tokens in dashboard panel labels with checkboxes?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-use-tokens-in-dashboard-panel-labels-with-checkboxes/m-p/345951#M22534</link>
      <description>&lt;P&gt;This is what I am using now, however by using $YearsAx$, my label literally says "Years = 2017".  Then if both 2017 and 2018 are selected, I get "Years = 2017 OR Years = 2018".  Not ideal.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Dec 2017 16:29:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-use-tokens-in-dashboard-panel-labels-with-checkboxes/m-p/345951#M22534</guid>
      <dc:creator>aferone</dc:creator>
      <dc:date>2017-12-18T16:29:24Z</dc:date>
    </item>
  </channel>
</rss>

