<?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 dynamically populate multiselect based on dropdown in my dashboard? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-dynamically-populate-multiselect-based-on-dropdown-in-my/m-p/392329#M25713</link>
    <description>&lt;P&gt;I have two inputs on my dashboard, the first is a dropdown input and the second is a multiselect.  The first dropdown shows a list of asset types (host, vm, pc, etc.) and the second multiselect input is a list of operating systems.  When somebody clicks on on an asset type, I'd like the multiselect to populate with only operating systems for that device type.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;form&amp;gt;
  &amp;lt;label&amp;gt;CMS_OS_TEST2&amp;lt;/label&amp;gt;
  &amp;lt;fieldset submitButton="false"&amp;gt;
    &amp;lt;input type="dropdown" token="sourcetype" searchWhenChanged="true"&amp;gt;
      &amp;lt;label&amp;gt;Asset Type&amp;lt;/label&amp;gt;
      &amp;lt;choice value="*"&amp;gt;ALL&amp;lt;/choice&amp;gt;
      &amp;lt;prefix&amp;gt;sourcetype="&amp;lt;/prefix&amp;gt;
      &amp;lt;suffix&amp;gt;"&amp;lt;/suffix&amp;gt;
      &amp;lt;fieldForLabel&amp;gt;sourcetype&amp;lt;/fieldForLabel&amp;gt;
      &amp;lt;fieldForValue&amp;gt;sourcetype&amp;lt;/fieldForValue&amp;gt;
      &amp;lt;search&amp;gt;
        &amp;lt;query&amp;gt;(index=cms_vm OR index=cms_host OR index=cms_pc) 
| eval sourcetype=case(sourcetype == "cms_vm", "VM", sourcetype == "cms_host", "Host", sourcetype == "cms_pc", "PC")
| table sourcetype
| dedup sourcetype&amp;lt;/query&amp;gt;
        &amp;lt;earliest&amp;gt;0&amp;lt;/earliest&amp;gt;
        &amp;lt;latest&amp;gt;&amp;lt;/latest&amp;gt;
      &amp;lt;/search&amp;gt;
    &amp;lt;/input&amp;gt;
    &amp;lt;input type="multiselect" token="osfield" searchWhenChanged="true"&amp;gt;
      &amp;lt;label&amp;gt;Operating System&amp;lt;/label&amp;gt;
      &amp;lt;fieldForLabel&amp;gt;OperatingSystem_Code&amp;lt;/fieldForLabel&amp;gt;
      &amp;lt;fieldForValue&amp;gt;OperatingSystem_Code&amp;lt;/fieldForValue&amp;gt;
      &amp;lt;search&amp;gt;
        &amp;lt;query&amp;gt;(index="cms_pc" OR index="cms_vm" OR index="cms_host"
| eval sourcetype=case(sourcetype == "cms_vm", "VM", sourcetype == "cms_host", "Host", sourcetype == "cms_pc", "PC")
| eval OperatingSystem_Code=case(sourcetype == "cms_pc", OperatingSystem_Code, sourcetype == "cms_vm", OperatingSystem_Code, sourcetype == "cms_host", OperatingSystem_Code)
| dedup OperatingSystem_Code&amp;lt;/query&amp;gt;
        &amp;lt;earliest&amp;gt;0&amp;lt;/earliest&amp;gt;
        &amp;lt;latest&amp;gt;&amp;lt;/latest&amp;gt;
      &amp;lt;/search&amp;gt;
      &amp;lt;choice value="*"&amp;gt;ALL&amp;lt;/choice&amp;gt;
      &amp;lt;valuePrefix&amp;gt;OperatingSystem_Code="&amp;lt;/valuePrefix&amp;gt;
      &amp;lt;valueSuffix&amp;gt;"&amp;lt;/valueSuffix&amp;gt;
      &amp;lt;delimiter&amp;gt; OR  &amp;lt;/delimiter&amp;gt;
    &amp;lt;/input&amp;gt;
  &amp;lt;/fieldset&amp;gt;
&amp;lt;/form&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;To sum it up: when I select 'PC' for the asset type, I only want to see Operating Systems found in the PC index, so on and so forth.&lt;/P&gt;</description>
    <pubDate>Thu, 14 Jun 2018 17:19:04 GMT</pubDate>
    <dc:creator>gbwilson</dc:creator>
    <dc:date>2018-06-14T17:19:04Z</dc:date>
    <item>
      <title>How to dynamically populate multiselect based on dropdown in my dashboard?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-dynamically-populate-multiselect-based-on-dropdown-in-my/m-p/392329#M25713</link>
      <description>&lt;P&gt;I have two inputs on my dashboard, the first is a dropdown input and the second is a multiselect.  The first dropdown shows a list of asset types (host, vm, pc, etc.) and the second multiselect input is a list of operating systems.  When somebody clicks on on an asset type, I'd like the multiselect to populate with only operating systems for that device type.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;form&amp;gt;
  &amp;lt;label&amp;gt;CMS_OS_TEST2&amp;lt;/label&amp;gt;
  &amp;lt;fieldset submitButton="false"&amp;gt;
    &amp;lt;input type="dropdown" token="sourcetype" searchWhenChanged="true"&amp;gt;
      &amp;lt;label&amp;gt;Asset Type&amp;lt;/label&amp;gt;
      &amp;lt;choice value="*"&amp;gt;ALL&amp;lt;/choice&amp;gt;
      &amp;lt;prefix&amp;gt;sourcetype="&amp;lt;/prefix&amp;gt;
      &amp;lt;suffix&amp;gt;"&amp;lt;/suffix&amp;gt;
      &amp;lt;fieldForLabel&amp;gt;sourcetype&amp;lt;/fieldForLabel&amp;gt;
      &amp;lt;fieldForValue&amp;gt;sourcetype&amp;lt;/fieldForValue&amp;gt;
      &amp;lt;search&amp;gt;
        &amp;lt;query&amp;gt;(index=cms_vm OR index=cms_host OR index=cms_pc) 
| eval sourcetype=case(sourcetype == "cms_vm", "VM", sourcetype == "cms_host", "Host", sourcetype == "cms_pc", "PC")
| table sourcetype
| dedup sourcetype&amp;lt;/query&amp;gt;
        &amp;lt;earliest&amp;gt;0&amp;lt;/earliest&amp;gt;
        &amp;lt;latest&amp;gt;&amp;lt;/latest&amp;gt;
      &amp;lt;/search&amp;gt;
    &amp;lt;/input&amp;gt;
    &amp;lt;input type="multiselect" token="osfield" searchWhenChanged="true"&amp;gt;
      &amp;lt;label&amp;gt;Operating System&amp;lt;/label&amp;gt;
      &amp;lt;fieldForLabel&amp;gt;OperatingSystem_Code&amp;lt;/fieldForLabel&amp;gt;
      &amp;lt;fieldForValue&amp;gt;OperatingSystem_Code&amp;lt;/fieldForValue&amp;gt;
      &amp;lt;search&amp;gt;
        &amp;lt;query&amp;gt;(index="cms_pc" OR index="cms_vm" OR index="cms_host"
| eval sourcetype=case(sourcetype == "cms_vm", "VM", sourcetype == "cms_host", "Host", sourcetype == "cms_pc", "PC")
| eval OperatingSystem_Code=case(sourcetype == "cms_pc", OperatingSystem_Code, sourcetype == "cms_vm", OperatingSystem_Code, sourcetype == "cms_host", OperatingSystem_Code)
| dedup OperatingSystem_Code&amp;lt;/query&amp;gt;
        &amp;lt;earliest&amp;gt;0&amp;lt;/earliest&amp;gt;
        &amp;lt;latest&amp;gt;&amp;lt;/latest&amp;gt;
      &amp;lt;/search&amp;gt;
      &amp;lt;choice value="*"&amp;gt;ALL&amp;lt;/choice&amp;gt;
      &amp;lt;valuePrefix&amp;gt;OperatingSystem_Code="&amp;lt;/valuePrefix&amp;gt;
      &amp;lt;valueSuffix&amp;gt;"&amp;lt;/valueSuffix&amp;gt;
      &amp;lt;delimiter&amp;gt; OR  &amp;lt;/delimiter&amp;gt;
    &amp;lt;/input&amp;gt;
  &amp;lt;/fieldset&amp;gt;
&amp;lt;/form&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;To sum it up: when I select 'PC' for the asset type, I only want to see Operating Systems found in the PC index, so on and so forth.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jun 2018 17:19:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-dynamically-populate-multiselect-based-on-dropdown-in-my/m-p/392329#M25713</guid>
      <dc:creator>gbwilson</dc:creator>
      <dc:date>2018-06-14T17:19:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to dynamically populate multiselect based on dropdown in my dashboard?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-dynamically-populate-multiselect-based-on-dropdown-in-my/m-p/392330#M25714</link>
      <description>&lt;P&gt;You can add &lt;CODE&gt;sourcetype=$sourcetype$&lt;/CODE&gt; in the query for your multiselect search, which will use the first token to search for the second. &lt;/P&gt;</description>
      <pubDate>Thu, 14 Jun 2018 19:23:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-dynamically-populate-multiselect-based-on-dropdown-in-my/m-p/392330#M25714</guid>
      <dc:creator>brendanmatthews</dc:creator>
      <dc:date>2018-06-14T19:23:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to dynamically populate multiselect based on dropdown in my dashboard?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-dynamically-populate-multiselect-based-on-dropdown-in-my/m-p/392331#M25715</link>
      <description>&lt;P&gt;Thanks for your help.  Working well now.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jun 2018 20:00:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-dynamically-populate-multiselect-based-on-dropdown-in-my/m-p/392331#M25715</guid>
      <dc:creator>gbwilson</dc:creator>
      <dc:date>2018-06-14T20:00:39Z</dc:date>
    </item>
  </channel>
</rss>

