<?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: Can Multiselect Input have a dynamic default value? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Can-Multiselect-Input-have-a-dynamic-default-value/m-p/227944#M45020</link>
    <description>&lt;P&gt;I've tried using 'set token=' in each possible spot in the XML hierarchy and have come to the conclusion that it simply does not work, I have not witnessed a new token get created.&lt;BR /&gt;
Also, tokens do not work in the 'default' field.  As far as I can tell the reason is that the 'default' value becomes part of the URL for the form, and tokens are not parsed yet.&lt;BR /&gt;
So, what I do to populate a default value is build it into the URL for the form.  In your case it would be something like:&lt;BR /&gt;
&lt;A href="http://your_search_head_host:8000/en-US/app/your_app_name/your_form_name?form.FY=2014"&gt;http://your_search_head_host:8000/en-US/app/your_app_name/your_form_name?form.FY=2014&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;and remove the $foo$ stuff.&lt;/P&gt;</description>
    <pubDate>Thu, 12 May 2016 13:50:41 GMT</pubDate>
    <dc:creator>cb_usps</dc:creator>
    <dc:date>2016-05-12T13:50:41Z</dc:date>
    <item>
      <title>Can Multiselect Input have a dynamic default value?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Can-Multiselect-Input-have-a-dynamic-default-value/m-p/227943#M45019</link>
      <description>&lt;P&gt;I'd hope something like the following would work:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;input type="multiselect" searchWhenChanged="true" token="FY"&amp;gt;
  &amp;lt;label&amp;gt;Fiscal Year&amp;lt;/label&amp;gt;
  &amp;lt;search&amp;gt;
    &amp;lt;query&amp;gt;| savedsearch filter_fiscal_year&amp;lt;/query&amp;gt;
   &amp;lt;condition match=" 1 == 1 "&amp;gt;
      &amp;lt;set token="foo"&amp;gt;"2014"&amp;lt;/set&amp;gt;
   &amp;lt;/condition&amp;gt;
  &amp;lt;/search&amp;gt;
  &amp;lt;default&amp;gt;$foo$&amp;lt;/default&amp;gt;
  &amp;lt;fieldForLabel&amp;gt;FISCAL_YEAR&amp;lt;/fieldForLabel&amp;gt;
  &amp;lt;fieldForValue&amp;gt;FISCAL_YEAR&amp;lt;/fieldForValue&amp;gt;
  &amp;lt;prefix&amp;gt;(&amp;lt;/prefix&amp;gt;
  &amp;lt;suffix&amp;gt;)&amp;lt;/suffix&amp;gt;
&amp;lt;/input&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Basically I'd like to populate $foo$ with the current fiscal year, while still allowing the user to select multiple fiscal years.&lt;BR /&gt;
So far my errors suggest either that the token isn't being created properly OR that I can't use a token within the  tag.&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Mar 2016 16:08:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Can-Multiselect-Input-have-a-dynamic-default-value/m-p/227943#M45019</guid>
      <dc:creator>shelbyladallen</dc:creator>
      <dc:date>2016-03-03T16:08:41Z</dc:date>
    </item>
    <item>
      <title>Re: Can Multiselect Input have a dynamic default value?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Can-Multiselect-Input-have-a-dynamic-default-value/m-p/227944#M45020</link>
      <description>&lt;P&gt;I've tried using 'set token=' in each possible spot in the XML hierarchy and have come to the conclusion that it simply does not work, I have not witnessed a new token get created.&lt;BR /&gt;
Also, tokens do not work in the 'default' field.  As far as I can tell the reason is that the 'default' value becomes part of the URL for the form, and tokens are not parsed yet.&lt;BR /&gt;
So, what I do to populate a default value is build it into the URL for the form.  In your case it would be something like:&lt;BR /&gt;
&lt;A href="http://your_search_head_host:8000/en-US/app/your_app_name/your_form_name?form.FY=2014"&gt;http://your_search_head_host:8000/en-US/app/your_app_name/your_form_name?form.FY=2014&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;and remove the $foo$ stuff.&lt;/P&gt;</description>
      <pubDate>Thu, 12 May 2016 13:50:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Can-Multiselect-Input-have-a-dynamic-default-value/m-p/227944#M45020</guid>
      <dc:creator>cb_usps</dc:creator>
      <dc:date>2016-05-12T13:50:41Z</dc:date>
    </item>
    <item>
      <title>Re: Can Multiselect Input have a dynamic default value?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Can-Multiselect-Input-have-a-dynamic-default-value/m-p/227945#M45021</link>
      <description>&lt;P&gt;Same Problem, &lt;BR /&gt;
I try to set the $foo$ token during a search at the same dashboard.&lt;/P&gt;

&lt;P&gt;Option "Select first coice" doesn't work at  multiselect.&lt;/P&gt;

&lt;P&gt;URL link doesn't work for me.&lt;/P&gt;

&lt;P&gt;Any other ideas?&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 25 Nov 2016 10:23:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Can-Multiselect-Input-have-a-dynamic-default-value/m-p/227945#M45021</guid>
      <dc:creator>Oti47</dc:creator>
      <dc:date>2016-11-25T10:23:18Z</dc:date>
    </item>
  </channel>
</rss>

