<?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: How to get a default value to work for span in a drop-down form? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-get-a-default-value-to-work-for-span-in-a-drop-down-form/m-p/250027#M15580</link>
    <description>&lt;P&gt;I work fine, I just like it more clean.  This is work around and I can not see in my search that its a Timechart search.&lt;/P&gt;</description>
    <pubDate>Tue, 11 Oct 2016 19:00:57 GMT</pubDate>
    <dc:creator>lakromani</dc:creator>
    <dc:date>2016-10-11T19:00:57Z</dc:date>
    <item>
      <title>How to get a default value to work for span in a drop-down form?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-get-a-default-value-to-work-for-span-in-a-drop-down-form/m-p/250022#M15575</link>
      <description>&lt;P&gt;I would like to use a drop-down menu to select span.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;1 min
5 min
10 min
20 min
1 hour
2 hour
default
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Problem is not to handle the drop-down, but to get  the default to work.&lt;BR /&gt;
&lt;CODE&gt;span=&lt;/CODE&gt; needs a value.  &lt;/P&gt;

&lt;P&gt;This is is how I get it to work.  But can it be simplified?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    &amp;lt;input type="dropdown" token="Span" searchWhenChanged="true"&amp;gt;
      &amp;lt;label&amp;gt;Time span&amp;lt;/label&amp;gt;
      &amp;lt;default&amp;gt;timechart&amp;lt;/default&amp;gt;
      &amp;lt;choice value="timechart"&amp;gt;Default&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="timechart span=1m"&amp;gt;1 min&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="timechart span=5m"&amp;gt;5 min&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="timechart span=10m"&amp;gt;10 min&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="timechart span=20m"&amp;gt;20 min&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="timechart span=1h"&amp;gt;1 hour&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="timechart span=2h"&amp;gt;2 hour&amp;lt;/choice&amp;gt;
    &amp;lt;/input&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And then my search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;my search .. | $Span$ count by server limit=0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I would like some like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;my search .. | timeshart span=$Span$ count by server limit=0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;or&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;my search .. | timeshart $Span$ count by server limit=0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But I am not able to get the &lt;STRONG&gt;default&lt;/STRONG&gt; to work.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Oct 2016 18:37:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-get-a-default-value-to-work-for-span-in-a-drop-down-form/m-p/250022#M15575</guid>
      <dc:creator>lakromani</dc:creator>
      <dc:date>2016-10-10T18:37:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a default value to work for span in a drop-down form?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-get-a-default-value-to-work-for-span-in-a-drop-down-form/m-p/250023#M15576</link>
      <description>&lt;P&gt;The default value is not available for span option, so give this workaround a try. bins=100 is the default value,so as long as you're not using that option in your timechart, you should be good to use  &lt;CODE&gt;my search .. | timeshart $Span$ count by server limit=0&lt;/CODE&gt; &lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;fixed token name to match the one used in search&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  &amp;lt;fieldset submitButton="false"&amp;gt;
    &amp;lt;input type="dropdown" token="Span" searchWhenChanged="true"&amp;gt;
      &amp;lt;label&amp;gt;Span&amp;lt;/label&amp;gt;
      &amp;lt;choice value="bins=100"&amp;gt;Default&amp;lt;/choice&amp;gt;
       &amp;lt;choice value="span=1m"&amp;gt;1 min&amp;lt;/choice&amp;gt;
       &amp;lt;choice value="span=5m"&amp;gt;5 min&amp;lt;/choice&amp;gt;
       &amp;lt;choice value="span=10m"&amp;gt;10 min&amp;lt;/choice&amp;gt;
       &amp;lt;choice value="span=20m"&amp;gt;20 min&amp;lt;/choice&amp;gt;
       &amp;lt;choice value="span=1h"&amp;gt;1 hour&amp;lt;/choice&amp;gt;
       &amp;lt;choice value="span=2h"&amp;gt;2 hour&amp;lt;/choice&amp;gt;
    &amp;lt;/input&amp;gt;
  &amp;lt;/fieldset&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 10 Oct 2016 19:02:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-get-a-default-value-to-work-for-span-in-a-drop-down-form/m-p/250023#M15576</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-10-10T19:02:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a default value to work for span in a drop-down form?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-get-a-default-value-to-work-for-span-in-a-drop-down-form/m-p/250024#M15577</link>
      <description>&lt;P&gt;That looks better than mine. But you have a small error.  &lt;STRONG&gt;token="span"&lt;/STRONG&gt; and &lt;STRONG&gt;$Span$&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Oct 2016 19:23:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-get-a-default-value-to-work-for-span-in-a-drop-down-form/m-p/250024#M15577</guid>
      <dc:creator>lakromani</dc:creator>
      <dc:date>2016-10-10T19:23:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a default value to work for span in a drop-down form?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-get-a-default-value-to-work-for-span-in-a-drop-down-form/m-p/250025#M15578</link>
      <description>&lt;P&gt;Hi @lakromani&lt;/P&gt;

&lt;P&gt;With that correction, does the answer by @somesoni2 solve your question? If yes, please don't forget to resolve the post by clicking "Accept" directly below his answer. &lt;/P&gt;</description>
      <pubDate>Mon, 10 Oct 2016 20:14:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-get-a-default-value-to-work-for-span-in-a-drop-down-form/m-p/250025#M15578</guid>
      <dc:creator>ppablo</dc:creator>
      <dc:date>2016-10-10T20:14:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a default value to work for span in a drop-down form?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-get-a-default-value-to-work-for-span-in-a-drop-down-form/m-p/250026#M15579</link>
      <description>&lt;P&gt;The way you have defined it absolutely should work.  What happens when you select &lt;CODE&gt;default&lt;/CODE&gt;?&lt;/P&gt;</description>
      <pubDate>Tue, 11 Oct 2016 18:15:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-get-a-default-value-to-work-for-span-in-a-drop-down-form/m-p/250026#M15579</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-10-11T18:15:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a default value to work for span in a drop-down form?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-get-a-default-value-to-work-for-span-in-a-drop-down-form/m-p/250027#M15580</link>
      <description>&lt;P&gt;I work fine, I just like it more clean.  This is work around and I can not see in my search that its a Timechart search.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Oct 2016 19:00:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-get-a-default-value-to-work-for-span-in-a-drop-down-form/m-p/250027#M15580</guid>
      <dc:creator>lakromani</dc:creator>
      <dc:date>2016-10-11T19:00:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a default value to work for span in a drop-down form?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-get-a-default-value-to-work-for-span-in-a-drop-down-form/m-p/250028#M15581</link>
      <description>&lt;P&gt;The way that you did it is just fine, IMHO.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Oct 2016 22:52:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-get-a-default-value-to-work-for-span-in-a-drop-down-form/m-p/250028#M15581</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-10-11T22:52:00Z</dc:date>
    </item>
  </channel>
</rss>

