<?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 set multiple values for a multi-select input in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-set-multiple-values-for-a-multi-select-input/m-p/436125#M28762</link>
    <description>&lt;P&gt;Hello,&lt;BR /&gt;
I have one multi-select input and looking to set its value dynamically based on some condition.&lt;BR /&gt;&lt;BR /&gt;
Not sure how to set multiple values to multi-select input token.&lt;BR /&gt;
For example, if condition 1 satisfy it should set 3 values to multiselect input.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;search&amp;gt;
    &amp;lt;query&amp;gt;| makeresults  &amp;lt;/query&amp;gt;
    &amp;lt;done&amp;gt;
      &amp;lt;condition match="CONDITION 1"&amp;gt;
          &amp;lt;eval token="form.MULTISELECT_TOKEN"&amp;gt;"VALUE_2  VALUE_3 VALUE_4"&amp;lt;/eval&amp;gt;
      &amp;lt;/condition&amp;gt;
       &amp;lt;condition match="CONDITION 2"&amp;gt;
              &amp;lt;eval token="form.MULTISELECT_TOKEN"&amp;gt;"VALUE_1"&amp;lt;/eval&amp;gt;    
      &amp;lt;/condition&amp;gt;
    &amp;lt;/done&amp;gt;
  &amp;lt;/search&amp;gt;

 &amp;lt;input type="multiselect" token="MULTISELECT_TOKEN"&amp;gt;
      &amp;lt;label&amp;gt;NICKNAME&amp;lt;/label&amp;gt;
      &amp;lt;!--choice value="*"&amp;gt;All&amp;lt;/choice--&amp;gt;
      &amp;lt;choice value="VALUE_1"&amp;gt;VALUE_1&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="VALUE_2"&amp;gt;VALUE_2&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="VALUE_3"&amp;gt;VALUE_3&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="VALUE_4"&amp;gt;VALUE_4&amp;lt;/choice&amp;gt;
      &amp;lt;default&amp;gt;VALUE_1&amp;lt;/default&amp;gt;
    &amp;lt;/input&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 20 Jun 2019 14:44:52 GMT</pubDate>
    <dc:creator>AKG1_old1</dc:creator>
    <dc:date>2019-06-20T14:44:52Z</dc:date>
    <item>
      <title>How to set multiple values for a multi-select input</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-set-multiple-values-for-a-multi-select-input/m-p/436125#M28762</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;
I have one multi-select input and looking to set its value dynamically based on some condition.&lt;BR /&gt;&lt;BR /&gt;
Not sure how to set multiple values to multi-select input token.&lt;BR /&gt;
For example, if condition 1 satisfy it should set 3 values to multiselect input.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;search&amp;gt;
    &amp;lt;query&amp;gt;| makeresults  &amp;lt;/query&amp;gt;
    &amp;lt;done&amp;gt;
      &amp;lt;condition match="CONDITION 1"&amp;gt;
          &amp;lt;eval token="form.MULTISELECT_TOKEN"&amp;gt;"VALUE_2  VALUE_3 VALUE_4"&amp;lt;/eval&amp;gt;
      &amp;lt;/condition&amp;gt;
       &amp;lt;condition match="CONDITION 2"&amp;gt;
              &amp;lt;eval token="form.MULTISELECT_TOKEN"&amp;gt;"VALUE_1"&amp;lt;/eval&amp;gt;    
      &amp;lt;/condition&amp;gt;
    &amp;lt;/done&amp;gt;
  &amp;lt;/search&amp;gt;

 &amp;lt;input type="multiselect" token="MULTISELECT_TOKEN"&amp;gt;
      &amp;lt;label&amp;gt;NICKNAME&amp;lt;/label&amp;gt;
      &amp;lt;!--choice value="*"&amp;gt;All&amp;lt;/choice--&amp;gt;
      &amp;lt;choice value="VALUE_1"&amp;gt;VALUE_1&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="VALUE_2"&amp;gt;VALUE_2&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="VALUE_3"&amp;gt;VALUE_3&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="VALUE_4"&amp;gt;VALUE_4&amp;lt;/choice&amp;gt;
      &amp;lt;default&amp;gt;VALUE_1&amp;lt;/default&amp;gt;
    &amp;lt;/input&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 20 Jun 2019 14:44:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-set-multiple-values-for-a-multi-select-input/m-p/436125#M28762</guid>
      <dc:creator>AKG1_old1</dc:creator>
      <dc:date>2019-06-20T14:44:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to set multiple values for a multi-select input</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-set-multiple-values-for-a-multi-select-input/m-p/436126#M28763</link>
      <description>&lt;P&gt;Hello @agoyal,&lt;/P&gt;

&lt;P&gt;Few XML elements you can specify with multi-select by that you can do.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;input type="multiselect" token="MULTISELECT_TOKEN"&amp;gt;
       &amp;lt;label&amp;gt;NICKNAME&amp;lt;/label&amp;gt;
       &amp;lt;!--choice value="*"&amp;gt;All&amp;lt;/choice--&amp;gt;
       &amp;lt;choice value="VALUE_1"&amp;gt;VALUE_1&amp;lt;/choice&amp;gt;
       &amp;lt;choice value="VALUE_2"&amp;gt;VALUE_2&amp;lt;/choice&amp;gt;
       &amp;lt;choice value="VALUE_3"&amp;gt;VALUE_3&amp;lt;/choice&amp;gt;
       &amp;lt;choice value="VALUE_4"&amp;gt;VALUE_4&amp;lt;/choice&amp;gt;
       &amp;lt;default&amp;gt; ( "VALUE_1" ) &amp;lt;/default&amp;gt;
       &amp;lt;valuePrefix&amp;gt;"&amp;lt;/valuePrefix&amp;gt;
       &amp;lt;valueSuffix&amp;gt;"&amp;lt;/valueSuffix&amp;gt;
       &amp;lt;delimiter&amp;gt; , &amp;lt;/delimiter&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;Then you specify value like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;set token="form.MULTISELECT_TOKEN"&amp;gt; ( "VALUE_2" , "VALUE_3" , "VALUE_4" ) &amp;lt;/set&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and Splunk dashboard will automatically select these three values. You can use other prefix, sufix and delimiter like AND, OR, etc. as per your requirement.&lt;/P&gt;

&lt;P&gt;Hope this helps!!!&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jun 2019 15:46:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-set-multiple-values-for-a-multi-select-input/m-p/436126#M28763</guid>
      <dc:creator>VatsalJagani</dc:creator>
      <dc:date>2019-06-20T15:46:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to set multiple values for a multi-select input</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-set-multiple-values-for-a-multi-select-input/m-p/436127#M28764</link>
      <description>&lt;P&gt;Thank you  for answer. it's not fully working in my case may be as I can't use prefix and postfit for multiselect. &lt;/P&gt;

&lt;P&gt;I have used this and worked for me.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;set token="form.NICKNAME_TOKEN"&amp;gt; Value 1" "Value2" "Value3&amp;lt;/set&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;eval is not working with this so I have to use set.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jun 2019 07:07:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-set-multiple-values-for-a-multi-select-input/m-p/436127#M28764</guid>
      <dc:creator>AKG1_old1</dc:creator>
      <dc:date>2019-06-21T07:07:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to set multiple values for a multi-select input</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-set-multiple-values-for-a-multi-select-input/m-p/436128#M28765</link>
      <description>&lt;P&gt;Very nice to hear that you figured that out. Basically all options are options which are fits with your case you can use those. Yeah we need to use set not eval, thanks for that.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jun 2019 09:18:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-set-multiple-values-for-a-multi-select-input/m-p/436128#M28765</guid>
      <dc:creator>VatsalJagani</dc:creator>
      <dc:date>2019-06-21T09:18:35Z</dc:date>
    </item>
  </channel>
</rss>

