<?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 can I set a dynamic default value in a dropdown (Simple XML) in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-set-a-dynamic-default-value-in-a-dropdown-Simple-XML/m-p/132041#M7790</link>
    <description>&lt;P&gt;It took me a while to figure out that this does not work for multiselect inputs. Why?&lt;/P&gt;</description>
    <pubDate>Tue, 28 Feb 2017 01:24:14 GMT</pubDate>
    <dc:creator>helge</dc:creator>
    <dc:date>2017-02-28T01:24:14Z</dc:date>
    <item>
      <title>How can I set a dynamic default value in a dropdown (Simple XML)</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-set-a-dynamic-default-value-in-a-dropdown-Simple-XML/m-p/132034#M7783</link>
      <description>&lt;P&gt;Is it possible to configure the dropdown input to take the first row returned by the populating Search as its default? &lt;BR /&gt;
If I configure the dropdown as follows it just has an empty field as its default.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;input type="dropdown" token="source" searchWhenChanged="true"&amp;gt;
  &amp;lt;label&amp;gt;Select a Sourcetype:&amp;lt;/label&amp;gt;
  &amp;lt;populatingSearch fieldForValue="sourcetype" fieldForLabel="sourcetype" earliest="-24h" latest="now"&amp;gt;
    &amp;lt;![CDATA[index=_internal | stats count by sourcetype]]&amp;gt;
  &amp;lt;/populatingSearch&amp;gt;
&amp;lt;/input&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
Chris&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jan 2014 16:35:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-set-a-dynamic-default-value-in-a-dropdown-Simple-XML/m-p/132034#M7783</guid>
      <dc:creator>chris</dc:creator>
      <dc:date>2014-01-30T16:35:37Z</dc:date>
    </item>
    <item>
      <title>Re: How can I set a dynamic default value in a dropdown (Simple XML)</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-set-a-dynamic-default-value-in-a-dropdown-Simple-XML/m-p/132035#M7784</link>
      <description>&lt;P&gt;Hi Chris,&lt;BR /&gt;
If you have got the solution can you please share it with me.Even I'm facing the same issue.&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jan 2014 10:25:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-set-a-dynamic-default-value-in-a-dropdown-Simple-XML/m-p/132035#M7784</guid>
      <dc:creator>harshal_chakran</dc:creator>
      <dc:date>2014-01-31T10:25:09Z</dc:date>
    </item>
    <item>
      <title>Re: How can I set a dynamic default value in a dropdown (Simple XML)</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-set-a-dynamic-default-value-in-a-dropdown-Simple-XML/m-p/132036#M7785</link>
      <description>&lt;P&gt;+1, I already asked this a month back but not resolved yet. &lt;A href="http://answers.splunk.com/answers/115727/splunk-6-simple-xml-dropdown-how-to-select-first-value-in-the-list"&gt;http://answers.splunk.com/answers/115727/splunk-6-simple-xml-dropdown-how-to-select-first-value-in-the-list&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jan 2014 17:22:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-set-a-dynamic-default-value-in-a-dropdown-Simple-XML/m-p/132036#M7785</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-01-31T17:22:33Z</dc:date>
    </item>
    <item>
      <title>Re: How can I set a dynamic default value in a dropdown (Simple XML)</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-set-a-dynamic-default-value-in-a-dropdown-Simple-XML/m-p/132037#M7786</link>
      <description>&lt;P&gt;Try this on for size:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;param name="search"&amp;gt;sourcetype=_internal earliest=-24h |fields host|dedup host
&amp;lt;/param&amp;gt;
&amp;lt;param name="label"&amp;gt;Select Name&amp;lt;/param&amp;gt;
&amp;lt;param name="settingToCreate"&amp;gt;host_setting&amp;lt;/param&amp;gt;
&amp;lt;param name="searchFieldsToDisplay"&amp;gt;
  &amp;lt;list&amp;gt;
    &amp;lt;param name="value"&amp;gt;host&amp;lt;/param&amp;gt;
    &amp;lt;param name="label"&amp;gt;host&amp;lt;/param&amp;gt;
  &amp;lt;/list&amp;gt;
&amp;lt;/param&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This should help you get what you want. You can get it to populate the dropdown based on "searchfieldsToDisplay"&lt;/P&gt;</description>
      <pubDate>Thu, 15 May 2014 16:44:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-set-a-dynamic-default-value-in-a-dropdown-Simple-XML/m-p/132037#M7786</guid>
      <dc:creator>Lazarix</dc:creator>
      <dc:date>2014-05-15T16:44:01Z</dc:date>
    </item>
    <item>
      <title>Re: How can I set a dynamic default value in a dropdown (Simple XML)</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-set-a-dynamic-default-value-in-a-dropdown-Simple-XML/m-p/132038#M7787</link>
      <description>&lt;P&gt;As of Splunk 6.0.2, you can now use "selectFirstChoice" to populate the form input with the first returned value.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  &amp;lt;input type="dropdown" token="source" searchWhenChanged="true"&amp;gt;
     &amp;lt;label&amp;gt;Select a Sourcetype:&amp;lt;/label&amp;gt;
     &amp;lt;populatingSearch fieldForValue="sourcetype" fieldForLabel="sourcetype" earliest="-24h" latest="now"&amp;gt;
        &amp;lt;![CDATA[index=_internal | stats count by sourcetype]]&amp;gt;
     &amp;lt;/populatingSearch&amp;gt;
     &amp;lt;selectFirstChoice&amp;gt;true&amp;lt;/selectFirstChoice&amp;gt;
  &amp;lt;/input&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 15 May 2014 22:00:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-set-a-dynamic-default-value-in-a-dropdown-Simple-XML/m-p/132038#M7787</guid>
      <dc:creator>nfilippi_splunk</dc:creator>
      <dc:date>2014-05-15T22:00:43Z</dc:date>
    </item>
    <item>
      <title>Re: How can I set a dynamic default value in a dropdown (Simple XML)</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-set-a-dynamic-default-value-in-a-dropdown-Simple-XML/m-p/132039#M7788</link>
      <description>&lt;P&gt;This is advanced xml&lt;/P&gt;</description>
      <pubDate>Thu, 15 May 2014 22:02:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-set-a-dynamic-default-value-in-a-dropdown-Simple-XML/m-p/132039#M7788</guid>
      <dc:creator>nfilippi_splunk</dc:creator>
      <dc:date>2014-05-15T22:02:13Z</dc:date>
    </item>
    <item>
      <title>Re: How can I set a dynamic default value in a dropdown (Simple XML)</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-set-a-dynamic-default-value-in-a-dropdown-Simple-XML/m-p/132040#M7789</link>
      <description>&lt;P&gt;Also working in v6.2.3&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; &amp;lt;input type="dropdown" token="field2" searchWhenChanged="true"&amp;gt;
      &amp;lt;label&amp;gt;Web application&amp;lt;/label&amp;gt;
      &amp;lt;search&amp;gt;
        &amp;lt;query&amp;gt;query&amp;lt;/query&amp;gt;
        &amp;lt;earliest&amp;gt;$field1.earliest$&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;$field1.latest$&amp;lt;/latest&amp;gt;
      &amp;lt;/search&amp;gt;
      &amp;lt;fieldForLabel&amp;gt;WebApp&amp;lt;/fieldForLabel&amp;gt;
      &amp;lt;fieldForValue&amp;gt;WebApp&amp;lt;/fieldForValue&amp;gt;
      &amp;lt;selectFirstChoice&amp;gt;true&amp;lt;/selectFirstChoice&amp;gt;
    &amp;lt;/input&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 12 Feb 2016 21:15:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-set-a-dynamic-default-value-in-a-dropdown-Simple-XML/m-p/132040#M7789</guid>
      <dc:creator>josefa</dc:creator>
      <dc:date>2016-02-12T21:15:59Z</dc:date>
    </item>
    <item>
      <title>Re: How can I set a dynamic default value in a dropdown (Simple XML)</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-set-a-dynamic-default-value-in-a-dropdown-Simple-XML/m-p/132041#M7790</link>
      <description>&lt;P&gt;It took me a while to figure out that this does not work for multiselect inputs. Why?&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2017 01:24:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-set-a-dynamic-default-value-in-a-dropdown-Simple-XML/m-p/132041#M7790</guid>
      <dc:creator>helge</dc:creator>
      <dc:date>2017-02-28T01:24:14Z</dc:date>
    </item>
    <item>
      <title>Re: How can I set a dynamic default value in a dropdown (Simple XML)</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-set-a-dynamic-default-value-in-a-dropdown-Simple-XML/m-p/132042#M7791</link>
      <description>&lt;P&gt;Any update how this has changed in version 6.5 ?  I am getting 'not a valid' node as warning.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jul 2017 07:52:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-set-a-dynamic-default-value-in-a-dropdown-Simple-XML/m-p/132042#M7791</guid>
      <dc:creator>nishantmishra21</dc:creator>
      <dc:date>2017-07-21T07:52:43Z</dc:date>
    </item>
    <item>
      <title>Re: How can I set a dynamic default value in a dropdown (Simple XML)</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-set-a-dynamic-default-value-in-a-dropdown-Simple-XML/m-p/132043#M7792</link>
      <description>&lt;P&gt;Still working in v 7.0.8.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Mar 2019 19:46:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-set-a-dynamic-default-value-in-a-dropdown-Simple-XML/m-p/132043#M7792</guid>
      <dc:creator>grittonc</dc:creator>
      <dc:date>2019-03-08T19:46:23Z</dc:date>
    </item>
    <item>
      <title>Re: How can I set a dynamic default value in a dropdown (Simple XML)</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-set-a-dynamic-default-value-in-a-dropdown-Simple-XML/m-p/579892#M47505</link>
      <description>&lt;P&gt;Thank you very much for this tip.&lt;/P&gt;&lt;P&gt;It doesn't work for me on 8.2.0 in&amp;nbsp;type="multiselect"&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":loudly_crying_face:"&gt;😭&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jan 2022 15:55:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-set-a-dynamic-default-value-in-a-dropdown-Simple-XML/m-p/579892#M47505</guid>
      <dc:creator>mclane1</dc:creator>
      <dc:date>2022-01-04T15:55:31Z</dc:date>
    </item>
  </channel>
</rss>

