<?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 use token in a multi-select form input? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-use-token-in-a-multi-select-form-input/m-p/480574#M31510</link>
    <description>&lt;P&gt;@493669  But I got the idea, on how to deal with it. &lt;BR /&gt;
Thank you for pointing me towards the right direction.&lt;/P&gt;</description>
    <pubDate>Wed, 08 Jan 2020 13:34:52 GMT</pubDate>
    <dc:creator>zacksoft</dc:creator>
    <dc:date>2020-01-08T13:34:52Z</dc:date>
    <item>
      <title>How to use token in a multi-select form input?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-use-token-in-a-multi-select-form-input/m-p/480570#M31506</link>
      <description>&lt;P&gt;In the dashboard, I have created three multi-select input fields.&lt;BR /&gt;
CONTINENT, COUNTRY , STATE&lt;/P&gt;

&lt;P&gt;Example : When I click on the CONTINENT drop down as "Asia", the COUNTRY drop down multiselect field automatically populates with asian coutries such as India, China, Japan etc...  Now I select "India" in the COUNTRY field and STATE gets populated with Indian States such as Delhi, Goa etc...  This works fine.&lt;BR /&gt;
Say, for STATE the background spl running for the multiselect value population is something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index = $continent_token$ | host=$country_token$ | table STATE
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;The issue arises, when I select multiple values in any of the fields, then the next field doesn't populate any values&lt;/STRONG&gt;. It only works when I select one field. Example : If I multi-select INDIA and CHINA under COUNTRY field then the STATES doen't populate anything. If i select only one, then only it populates.&lt;/P&gt;

&lt;P&gt;Could anyone guide me on how to deal with this????&lt;BR /&gt;
I want to be able to see the STATES of both INDIA and CHINA if I select (multiselect 2 countries) .&lt;/P&gt;

&lt;P&gt;Just to add more clarification. In our system index value is CONTINENT, COUTRY is HOST and STATE is SourceType&lt;BR /&gt;
So basically looking to select multiple hosts and then should able to see sourcetypes from all those hosts to be populated. Also to be able to select multiple indexes and the hosts of all those selected indices should come.&lt;/P&gt;

&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jan 2020 11:10:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-use-token-in-a-multi-select-form-input/m-p/480570#M31506</guid>
      <dc:creator>zacksoft</dc:creator>
      <dc:date>2020-01-08T11:10:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to use token in a multi-select form input?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-use-token-in-a-multi-select-form-input/m-p/480571#M31507</link>
      <description>&lt;P&gt;Hi @zacksoft, Use below multiselect token for country-&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  &amp;lt;input type="multiselect" token="host"&amp;gt;
      &amp;lt;label&amp;gt;select Country&amp;lt;/label&amp;gt;
      &amp;lt;fieldForLabel&amp;gt;Vehicle&amp;lt;/fieldForLabel&amp;gt;
      &amp;lt;fieldForValue&amp;gt;Vehicle&amp;lt;/fieldForValue&amp;gt;
      &amp;lt;search id="idSearchSelectIndex"&amp;gt;
        &amp;lt;query&amp;gt;your query&amp;lt;/query&amp;gt;
        &amp;lt;earliest&amp;gt;-24h@h&amp;lt;/earliest&amp;gt;
        &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
         &amp;lt;/search&amp;gt;
      &amp;lt;default&amp;gt;&amp;lt;/default&amp;gt;
      &amp;lt;prefix&amp;gt;(&amp;lt;/prefix&amp;gt;
      &amp;lt;suffix&amp;gt;)&amp;lt;/suffix&amp;gt;
      &amp;lt;valuePrefix&amp;gt;host="&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;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;then use below query for state populaion-&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index = $continent_token$ $host$ | table STATE
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 08 Jan 2020 11:33:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-use-token-in-a-multi-select-form-input/m-p/480571#M31507</guid>
      <dc:creator>493669</dc:creator>
      <dc:date>2020-01-08T11:33:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to use token in a multi-select form input?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-use-token-in-a-multi-select-form-input/m-p/480572#M31508</link>
      <description>&lt;P&gt;@493669 - Just to add  more clarification. In our system index value is CONTINENT, COUTRY is HOST and STATE is SourceType&lt;BR /&gt;
So basically looking to select multiple  hosts and then should able to see sourcetypes from all those hosts to be populated. Also to be able to select multiple index and the hosts of all those selected indices should come.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jan 2020 12:16:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-use-token-in-a-multi-select-form-input/m-p/480572#M31508</guid>
      <dc:creator>zacksoft</dc:creator>
      <dc:date>2020-01-08T12:16:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to use token in a multi-select form input?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-use-token-in-a-multi-select-form-input/m-p/480573#M31509</link>
      <description>&lt;P&gt;I used as you suggested near COUNTRY (i.e. near host)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;input type="multiselect" token="choose_host" searchWhenChanged="true"&amp;gt;
      &amp;lt;label&amp;gt;Step-2 &amp;amp;gt;&amp;amp;gt;  Host&amp;lt;/label&amp;gt;
      &amp;lt;fieldForLabel&amp;gt;Vehicle&amp;lt;/fieldForLabel&amp;gt;
      &amp;lt;fieldForValue&amp;gt;Vehicle&amp;lt;/fieldForValue&amp;gt;
      &amp;lt;search id="idSearchSelectIndex"&amp;gt; 
       &amp;lt;query&amp;gt;index = $choose_index$ | table host | dedup host&amp;lt;/query&amp;gt;
        &amp;lt;earliest&amp;gt;-60m@m&amp;lt;/earliest&amp;gt;
        &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
        &amp;lt;default&amp;gt;&amp;lt;/default&amp;gt;
       &amp;lt;prefix&amp;gt;(&amp;lt;/prefix&amp;gt;
       &amp;lt;suffix&amp;gt;)&amp;lt;/suffix&amp;gt;
       &amp;lt;valuePrefix&amp;gt;host="&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;/search&amp;gt;
    &amp;lt;/input&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But after selecting one index(CONTINENT) , nothing populates in host(Country).&lt;BR /&gt;
It shows the error "&lt;BR /&gt;
Duplicate values causing conflic"&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jan 2020 12:41:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-use-token-in-a-multi-select-form-input/m-p/480573#M31509</guid>
      <dc:creator>zacksoft</dc:creator>
      <dc:date>2020-01-08T12:41:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to use token in a multi-select form input?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-use-token-in-a-multi-select-form-input/m-p/480574#M31510</link>
      <description>&lt;P&gt;@493669  But I got the idea, on how to deal with it. &lt;BR /&gt;
Thank you for pointing me towards the right direction.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jan 2020 13:34:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-use-token-in-a-multi-select-form-input/m-p/480574#M31510</guid>
      <dc:creator>zacksoft</dc:creator>
      <dc:date>2020-01-08T13:34:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to use token in a multi-select form input?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-use-token-in-a-multi-select-form-input/m-p/480575#M31511</link>
      <description>&lt;P&gt;Hello, &lt;/P&gt;

&lt;P&gt;Is a simple example to use multiselect, you can copy and past this example to have idea:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;fieldset submitButton="false"&amp;gt;
    &amp;lt;input type="multiselect" token="index"&amp;gt;
      &amp;lt;label&amp;gt;index&amp;lt;/label&amp;gt;
      &amp;lt;choice value="_internal"&amp;gt;_internal&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="_introspection"&amp;gt;_introspection&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="_audit"&amp;gt;_audit&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="_telemetry"&amp;gt;_telemetry&amp;lt;/choice&amp;gt;
      &amp;lt;prefix&amp;gt;(&amp;lt;/prefix&amp;gt;
      &amp;lt;suffix&amp;gt;)&amp;lt;/suffix&amp;gt;
      &amp;lt;valuePrefix&amp;gt;index=&amp;lt;/valuePrefix&amp;gt;
      &amp;lt;delimiter&amp;gt; OR &amp;lt;/delimiter&amp;gt;
    &amp;lt;/input&amp;gt;
    &amp;lt;input type="multiselect" token="sourcetype"&amp;gt;
      &amp;lt;label&amp;gt;sourcetype&amp;lt;/label&amp;gt;
      &amp;lt;prefix&amp;gt;(&amp;lt;/prefix&amp;gt;
      &amp;lt;suffix&amp;gt;)&amp;lt;/suffix&amp;gt;
      &amp;lt;valuePrefix&amp;gt;sourcetype=&amp;lt;/valuePrefix&amp;gt;
      &amp;lt;delimiter&amp;gt; OR &amp;lt;/delimiter&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$ | dedup sourcetype | table sourcetype&amp;lt;/query&amp;gt;
&amp;lt;earliest&amp;gt;-24h@h&amp;lt;/earliest&amp;gt;
    &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
  &amp;lt;/search&amp;gt;
&amp;lt;/input&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 08 Jan 2020 16:21:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-use-token-in-a-multi-select-form-input/m-p/480575#M31511</guid>
      <dc:creator>TISKAR</dc:creator>
      <dc:date>2020-01-08T16:21:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to use token in a multi-select form input?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-use-token-in-a-multi-select-form-input/m-p/640628#M52336</link>
      <description>&lt;P&gt;You can also use the IN component of search. When you have select multiple items in a multi-select dropdown, they are appended in a comma separated list.&lt;/P&gt;&lt;P&gt;Try the following.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;index IN ($continent_token$) host IN ($country_token$)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Note also, you shouldn't have pipes in between search terms.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Apr 2023 15:20:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-use-token-in-a-multi-select-form-input/m-p/640628#M52336</guid>
      <dc:creator>jamin358</dc:creator>
      <dc:date>2023-04-19T15:20:27Z</dc:date>
    </item>
  </channel>
</rss>

