<?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: convert my dropdown to radio button input in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/convert-my-dropdown-to-radio-button-input/m-p/402017#M41612</link>
    <description>&lt;P&gt;what if the list is not static (I mean US1,US2.US3 is not static values) &lt;/P&gt;</description>
    <pubDate>Thu, 17 May 2018 19:38:54 GMT</pubDate>
    <dc:creator>navd</dc:creator>
    <dc:date>2018-05-17T19:38:54Z</dc:date>
    <item>
      <title>convert my dropdown to radio button input</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/convert-my-dropdown-to-radio-button-input/m-p/402012#M41607</link>
      <description>&lt;P&gt;I have drop down listing down countries . for example my drop down has values as shown below .Now I want to display just two radio buttons instead of drop down ,which should be just UK and US and all the data under US should be US1,US2 .&lt;BR /&gt;
And Uk radio button should have UK1,UK2,UK3 &lt;BR /&gt;
US1&lt;BR /&gt;
UK1&lt;BR /&gt;
UK2&lt;BR /&gt;
UK3&lt;BR /&gt;
US2&lt;/P&gt;</description>
      <pubDate>Thu, 17 May 2018 15:01:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/convert-my-dropdown-to-radio-button-input/m-p/402012#M41607</guid>
      <dc:creator>navd</dc:creator>
      <dc:date>2018-05-17T15:01:46Z</dc:date>
    </item>
    <item>
      <title>Re: convert my dropdown to radio button input</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/convert-my-dropdown-to-radio-button-input/m-p/402013#M41608</link>
      <description>&lt;P&gt;Hi. Just a question. What do you mean by  'all the data under US should be US1,US2? Does it mean you want the values US1,US2 in the token to be used for a search?&lt;/P&gt;</description>
      <pubDate>Thu, 17 May 2018 15:11:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/convert-my-dropdown-to-radio-button-input/m-p/402013#M41608</guid>
      <dc:creator>poete</dc:creator>
      <dc:date>2018-05-17T15:11:04Z</dc:date>
    </item>
    <item>
      <title>Re: convert my dropdown to radio button input</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/convert-my-dropdown-to-radio-button-input/m-p/402014#M41609</link>
      <description>&lt;P&gt;How about setting value to "US* OR UK*"?&lt;/P&gt;</description>
      <pubDate>Thu, 17 May 2018 15:18:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/convert-my-dropdown-to-radio-button-input/m-p/402014#M41609</guid>
      <dc:creator>HiroshiSatoh</dc:creator>
      <dc:date>2018-05-17T15:18:50Z</dc:date>
    </item>
    <item>
      <title>Re: convert my dropdown to radio button input</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/convert-my-dropdown-to-radio-button-input/m-p/402015#M41610</link>
      <description>&lt;P&gt;Yes the US should list only US1 and US2 &lt;/P&gt;</description>
      <pubDate>Thu, 17 May 2018 15:27:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/convert-my-dropdown-to-radio-button-input/m-p/402015#M41610</guid>
      <dc:creator>navd</dc:creator>
      <dc:date>2018-05-17T15:27:03Z</dc:date>
    </item>
    <item>
      <title>Re: convert my dropdown to radio button input</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/convert-my-dropdown-to-radio-button-input/m-p/402016#M41611</link>
      <description>&lt;P&gt;@navd, you can code the &lt;CODE&gt;&amp;lt;change&amp;gt;&lt;/CODE&gt; event handler for the radio button to set this. Based on the the information provided you need something like the following &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;      &amp;lt;change&amp;gt;
        &amp;lt;condition value="US"&amp;gt;
          &amp;lt;set token="tokRegionFilter"&amp;gt;US1,US2,US3&amp;lt;/set&amp;gt;
        &amp;lt;/condition&amp;gt;
        &amp;lt;condition value="UK"&amp;gt;
          &amp;lt;set token="tokRegionFilter"&amp;gt;UK1,UK2&amp;lt;/set&amp;gt;
        &amp;lt;/condition&amp;gt;
      &amp;lt;/change&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then if you are on Splunk 6.6 or higher, you can use Search Filter using &lt;CODE&gt;IN&lt;/CODE&gt; clause. Preferably in the base search for faster results. The following example demonstrates the same approach. It uses &lt;CODE&gt;| search Region IN ($tokRegionFilter$)&lt;/CODE&gt; down the line since the previous queries are used to generate the mock data. Similar to the question 3 US and 2 UK regions have been created, the same can be changed/adjusted as per the need.&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/4968iBC2EE3145FCA1958/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Following is the Simple XML code for run anywhere example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;form&amp;gt;
  &amp;lt;label&amp;gt;Radio Button for setting multiple values&amp;lt;/label&amp;gt;
  &amp;lt;fieldset submitButton="false"&amp;gt;
    &amp;lt;input type="radio" token="tokRegion" searchWhenChanged="true"&amp;gt;
      &amp;lt;label&amp;gt;Select Region&amp;lt;/label&amp;gt;
      &amp;lt;choice value="US"&amp;gt;US&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="UK"&amp;gt;UK&amp;lt;/choice&amp;gt;
      &amp;lt;change&amp;gt;
        &amp;lt;condition value="US"&amp;gt;
          &amp;lt;set token="tokRegionFilter"&amp;gt;US1,US2,US3&amp;lt;/set&amp;gt;
        &amp;lt;/condition&amp;gt;
        &amp;lt;condition value="UK"&amp;gt;
          &amp;lt;set token="tokRegionFilter"&amp;gt;UK1,UK2&amp;lt;/set&amp;gt;
        &amp;lt;/condition&amp;gt;
      &amp;lt;/change&amp;gt;
      &amp;lt;default&amp;gt;US&amp;lt;/default&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;Volume by Region&amp;lt;/title&amp;gt;
      &amp;lt;chart&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;| makeresults
| fields - _time
| eval Region="US1,US2,US3,UK1,UK2"
| makemv Region delim=","
| mvexpand Region
| eval No_of_Hits=random()
| table Region No_of_Hits
| search Region IN ($tokRegionFilter$)
| sort - No_of_Hits&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;$earliest$&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;$latest$&amp;lt;/latest&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="charting.chart"&amp;gt;bar&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.drilldown"&amp;gt;all&amp;lt;/option&amp;gt;
        &amp;lt;option name="refresh.display"&amp;gt;progressbar&amp;lt;/option&amp;gt;
      &amp;lt;/chart&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, 17 May 2018 18:35:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/convert-my-dropdown-to-radio-button-input/m-p/402016#M41611</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2018-05-17T18:35:59Z</dc:date>
    </item>
    <item>
      <title>Re: convert my dropdown to radio button input</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/convert-my-dropdown-to-radio-button-input/m-p/402017#M41612</link>
      <description>&lt;P&gt;what if the list is not static (I mean US1,US2.US3 is not static values) &lt;/P&gt;</description>
      <pubDate>Thu, 17 May 2018 19:38:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/convert-my-dropdown-to-radio-button-input/m-p/402017#M41612</guid>
      <dc:creator>navd</dc:creator>
      <dc:date>2018-05-17T19:38:54Z</dc:date>
    </item>
    <item>
      <title>Re: convert my dropdown to radio button input</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/convert-my-dropdown-to-radio-button-input/m-p/402018#M41613</link>
      <description>&lt;P&gt;What is the query for getting the values US1, US2, US3 etc If it is dynamic how would you map US with US1, US2, US3 etc? Do the values actually have some number/pattern in the end (after the name)? If so, can you try the option proposed by @HiroshiSatoh to suffix asterisk &lt;CODE&gt;*&lt;/CODE&gt;?&lt;/P&gt;</description>
      <pubDate>Thu, 17 May 2018 20:22:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/convert-my-dropdown-to-radio-button-input/m-p/402018#M41613</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2018-05-17T20:22:07Z</dc:date>
    </item>
  </channel>
</rss>

