<?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 remove if ALL selection is selected in multiselect based on field for label not by Value? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-remove-if-ALL-selection-is-selected-in-multiselect-based/m-p/496952#M32526</link>
    <description>&lt;P&gt;Remove "All" from multiselect input when other options selected vice versa . i want to reset by field for label not by value"&lt;EM&gt;". since the value is not "&lt;/EM&gt;" and its a dynamic value.&lt;/P&gt;</description>
    <pubDate>Tue, 28 Jan 2020 11:11:00 GMT</pubDate>
    <dc:creator>DataOrg</dc:creator>
    <dc:date>2020-01-28T11:11:00Z</dc:date>
    <item>
      <title>How to remove if ALL selection is selected in multiselect based on field for label not by Value?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-remove-if-ALL-selection-is-selected-in-multiselect-based/m-p/496952#M32526</link>
      <description>&lt;P&gt;Remove "All" from multiselect input when other options selected vice versa . i want to reset by field for label not by value"&lt;EM&gt;". since the value is not "&lt;/EM&gt;" and its a dynamic value.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jan 2020 11:11:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-remove-if-ALL-selection-is-selected-in-multiselect-based/m-p/496952#M32526</guid>
      <dc:creator>DataOrg</dc:creator>
      <dc:date>2020-01-28T11:11:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove if ALL selection is selected in multiselect based on field for label not by Value?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-remove-if-ALL-selection-is-selected-in-multiselect-based/m-p/496953#M32527</link>
      <description>&lt;P&gt;@premranjithj &lt;/P&gt;

&lt;P&gt;Can you please try below Dashboard example ?&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Remove Select ALL on the basis of &lt;CODE&gt;FieldValue&lt;/CODE&gt; .&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;XML Code:&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;form script="myscript.js"&amp;gt;
  &amp;lt;label&amp;gt;Multiselect Remove All&amp;lt;/label&amp;gt;
  &amp;lt;fieldset submitButton="false"&amp;gt;
    &amp;lt;input type="multiselect" token="multiselect" id="multiselectId"&amp;gt;
      &amp;lt;label&amp;gt;Multi Select&amp;lt;/label&amp;gt;
      &amp;lt;choice value="*"&amp;gt;All&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="A"&amp;gt;A&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="B"&amp;gt;B&amp;lt;/choice&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;&lt;STRONG&gt;myscript.js&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;require([
    'underscore',
    'splunkjs/mvc',
    'splunkjs/mvc/simplexml/ready!'], function (_, mvc) {

var multiselect = splunkjs.mvc.Components.getInstance("multiselectId");
multiselect.on("change", function (value) {

    if (value.length &amp;gt; 1 &amp;amp;&amp;amp; ~(value.indexOf("*"))) {
        if (value.indexOf("*") == 0) {
            value.splice(value.indexOf("*"), 1);
            this.val(value);

        } else {
            this.val("*");
        }
        this.render();
    }
})
});
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;Remove Select ALL on the basis of &lt;CODE&gt;FieldLabel&lt;/CODE&gt; .&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;XML:&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;form script="myscript.js"&amp;gt;
  &amp;lt;label&amp;gt;Multiselect Remove All&amp;lt;/label&amp;gt;
  &amp;lt;fieldset submitButton="false"&amp;gt;
    &amp;lt;input type="multiselect" token="multiselect" id="multiselectId"&amp;gt;
      &amp;lt;label&amp;gt;Multi Select&amp;lt;/label&amp;gt;
      &amp;lt;choice value="0"&amp;gt;All Shops&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="1"&amp;gt;A&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="2"&amp;gt;B&amp;lt;/choice&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;&lt;STRONG&gt;myscript.js&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;require([
    'underscore',
    'splunkjs/mvc',
    'splunkjs/mvc/simplexml/ready!'], function (_, mvc) {

var multiselect = splunkjs.mvc.Components.getInstance("multiselectId");
multiselect.on("change", function (value) {
    var defaulLabel="All Shops";
    var defaulValue="";

    var lbl = $.map(this.options.choices, function(item,i) {
        if(item.label==defaulLabel) {
            defaulValue = item.value;
            indexofDefaulValue = i;
        }
        if((~value.indexOf(item.value))){
            return item.label;   
        }
    });
    var vls = $.map(this.options.choices, function(item,i) {
        if((~value.indexOf(item.value))){
            return item.value;   
        }
    });

    if (value.length &amp;gt; 1 &amp;amp;&amp;amp; ~(value.indexOf(defaulValue))) {
        if (value.indexOf(defaulValue) == 0) {
            vls.splice(vls.indexOf(defaulValue), 1);
            this.val(vls);
        } else {
            this.val(defaulValue);
        }
        this.render();
    }
})
});
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;Remove Select ALL on the basis of ONLY &lt;CODE&gt;FieldLabel&lt;/CODE&gt; which doesn't have &lt;CODE&gt;FieldValue&lt;/CODE&gt;.&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;XML:&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; &amp;lt;form script="myscript.js"&amp;gt;
   &amp;lt;label&amp;gt;Multiselect Remove All&amp;lt;/label&amp;gt;
   &amp;lt;fieldset submitButton="false"&amp;gt;
     &amp;lt;input type="multiselect" token="multiselect" id="multiselectId"&amp;gt;
       &amp;lt;label&amp;gt;Multi Select&amp;lt;/label&amp;gt;
       &amp;lt;choice&amp;gt;All Shops&amp;lt;/choice&amp;gt;
       &amp;lt;choice&amp;gt;A&amp;lt;/choice&amp;gt;
       &amp;lt;choice&amp;gt;B&amp;lt;/choice&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;&lt;STRONG&gt;myscript.js&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;require([
     'underscore',
     'splunkjs/mvc',
     'splunkjs/mvc/simplexml/ready!'], function (_, mvc) {

 var multiselect = splunkjs.mvc.Components.getInstance("multiselectId");
 multiselect.on("change", function (value) {
     var defaulLabel="All Shops";
     if (value.length &amp;gt; 1 &amp;amp;&amp;amp; ~(value.indexOf(defaulLabel))) {
         if (value.indexOf(defaulLabel) == 0) {
             value.splice(value.indexOf(defaulLabel), 1);
             this.val(value);
             console.log("Final ",value);
         } else {
             this.val(defaulLabel);
         }
         this.render();
     }
 })
 });
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;Remove Select ALL on the basis of &lt;CODE&gt;FieldValue&lt;/CODE&gt;.&lt;/STRONG&gt;&lt;BR /&gt;
&lt;STRONG&gt;Get all option values in different token when select "All" option&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;XML&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; &amp;lt;form script="myscript.js"&amp;gt;
   &amp;lt;label&amp;gt;Multiselect Remove All&amp;lt;/label&amp;gt;
   &amp;lt;fieldset submitButton="false"&amp;gt;
     &amp;lt;input type="multiselect" token="multiselect" id="multiselectId"&amp;gt;
       &amp;lt;label&amp;gt;Multi Select&amp;lt;/label&amp;gt;
       &amp;lt;delimiter&amp;gt; ,&amp;lt;/delimiter&amp;gt;
       &amp;lt;fieldForLabel&amp;gt;Servers&amp;lt;/fieldForLabel&amp;gt;
       &amp;lt;fieldForValue&amp;gt;Servers&amp;lt;/fieldForValue&amp;gt;
       &amp;lt;search id="multiselectsearch"&amp;gt;
         &amp;lt;query&amp;gt;| makeresults | eval Servers="Server 1" | append [| makeresults | eval Servers="Server 2"]| table Servers&amp;lt;/query&amp;gt;
       &amp;lt;/search&amp;gt;
       &amp;lt;choice value="*"&amp;gt;All Hosts&amp;lt;/choice&amp;gt;
     &amp;lt;/input&amp;gt;
   &amp;lt;/fieldset&amp;gt;
   &amp;lt;row&amp;gt;
     &amp;lt;panel&amp;gt;
       &amp;lt;html&amp;gt;
         &amp;lt;code&amp;gt;multiselectCondition : &amp;lt;/code&amp;gt; $multiselectCondition$ &amp;amp;lt;br/&amp;amp;gt;
       &amp;lt;/html&amp;gt;
     &amp;lt;/panel&amp;gt;
   &amp;lt;/row&amp;gt;
 &amp;lt;/form&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;myscript.js&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;require([
     'underscore',
     'splunkjs/mvc',
     'splunkjs/mvc/simplexml/ready!'], function (_, mvc) {

     var multiselectsearch = mvc.Components.get("multiselectsearch");
     var submitted_tokens = mvc.Components.getInstance('submitted');
     var default_token_model = mvc.Components.getInstance('default');

     var multiselectsearch_results = multiselectsearch.data("preview");

     var fieldForFilter = "host";
     var AllCondition = ""; 
     multiselectsearch_results.on("data", function () {
         $.each(multiselectsearch_results.data().rows, function (i, value) {
             if(AllCondition!="") {
                 AllCondition+="OR "
             }
             AllCondition = AllCondition + fieldForFilter + '="' + value[0] +'" ';
         });
     });

     var multiselect = splunkjs.mvc.Components.getInstance("multiselectId");
     multiselect.on("change", function (value) {
         var Condition = "";
         $.map(value, function(item,i) {
             if(item!="*") {
                 if(Condition!="") {
                     Condition+="OR "
                 }
                 Condition = Condition + fieldForFilter + '="' + item +'" ';
             }
         });

         if (value.length &amp;gt; 1 &amp;amp;&amp;amp; ~(value.indexOf("*"))) {
             if (value.indexOf("*") == 0) {
                 value.splice(value.indexOf("*"), 1);
                 this.val(value);
                 default_token_model.set("multiselectCondition", Condition);
             } else {
                 this.val("*");
                 default_token_model.set("multiselectCondition", AllCondition);    
             }
             this.render();
         } 
         else {
             if(value.indexOf("*") == 0) {
                 default_token_model.set("multiselectCondition", AllCondition);    
             }
             else {
                 if(Condition.length==0) {
                     default_token_model.unset("multiselectCondition");
                 } else {
                     default_token_model.set("multiselectCondition", Condition);
                 }
             }
         }
         submitted_tokens.set(default_token_model.toJSON());
     })
 });
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks&lt;BR /&gt;
** HAPPY SPLUNKING **&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jan 2020 13:41:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-remove-if-ALL-selection-is-selected-in-multiselect-based/m-p/496953#M32527</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2020-01-28T13:41:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove if ALL selection is selected in multiselect based on field for label not by Value?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-remove-if-ALL-selection-is-selected-in-multiselect-based/m-p/496954#M32528</link>
      <description>&lt;P&gt;@kamlesh_vaghela  My value is not * in my multiselect so instead of *  i want to check field for label which is "All Shops". the value for "All shops" is dynamic so i want to check for display value then the field value. Please help to figure it out&lt;/P&gt;

&lt;P&gt;"All Shops"&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jan 2020 14:32:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-remove-if-ALL-selection-is-selected-in-multiselect-based/m-p/496954#M32528</guid>
      <dc:creator>DataOrg</dc:creator>
      <dc:date>2020-01-28T14:32:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove if ALL selection is selected in multiselect based on field for label not by Value?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-remove-if-ALL-selection-is-selected-in-multiselect-based/m-p/496955#M32529</link>
      <description>&lt;P&gt;@premranjithj&lt;/P&gt;

&lt;P&gt;I have updated my answer. Please check section &lt;STRONG&gt;Remove Select ALL on the basis of &lt;CODE&gt;FieldLabel&lt;/CODE&gt;&lt;/STRONG&gt; .&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jan 2020 06:23:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-remove-if-ALL-selection-is-selected-in-multiselect-based/m-p/496955#M32529</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2020-01-29T06:23:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove if ALL selection is selected in multiselect based on field for label not by Value?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-remove-if-ALL-selection-is-selected-in-multiselect-based/m-p/496956#M32530</link>
      <description>&lt;P&gt;@kamlesh_vaghela its working for the static value which we are configuring on the multiselect.&lt;BR /&gt;
if the fieldvalue is not configured and if its generated from search. how to map it to fieldlabel generated during search in the multiselect&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jan 2020 06:38:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-remove-if-ALL-selection-is-selected-in-multiselect-based/m-p/496956#M32530</guid>
      <dc:creator>DataOrg</dc:creator>
      <dc:date>2020-01-30T06:38:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove if ALL selection is selected in multiselect based on field for label not by Value?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-remove-if-ALL-selection-is-selected-in-multiselect-based/m-p/496957#M32531</link>
      <description>&lt;P&gt;@premranjithj&lt;/P&gt;

&lt;P&gt;Can you please try this code and confirm it?&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;XML:&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;form script="myscript.js"&amp;gt;
  &amp;lt;label&amp;gt;Multiselect Remove All&amp;lt;/label&amp;gt;
  &amp;lt;fieldset submitButton="false"&amp;gt;
    &amp;lt;input type="multiselect" token="multiselect" id="multiselectId"&amp;gt;
      &amp;lt;label&amp;gt;Multi Select&amp;lt;/label&amp;gt;
      &amp;lt;choice&amp;gt;All Shops&amp;lt;/choice&amp;gt;
      &amp;lt;choice&amp;gt;A&amp;lt;/choice&amp;gt;
      &amp;lt;choice&amp;gt;B&amp;lt;/choice&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;myscript.js&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;require([
    'underscore',
    'splunkjs/mvc',
    'splunkjs/mvc/simplexml/ready!'], function (_, mvc) {

var multiselect = splunkjs.mvc.Components.getInstance("multiselectId");
multiselect.on("change", function (value) {
    var defaulLabel="All Shops";
    if (value.length &amp;gt; 1 &amp;amp;&amp;amp; ~(value.indexOf(defaulLabel))) {
        if (value.indexOf(defaulLabel) == 0) {
            value.splice(value.indexOf(defaulLabel), 1);
            this.val(value);
            console.log("Final ",value);
        } else {
            this.val(defaulLabel);
        }
        this.render();
    }
})
});
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 30 Jan 2020 09:22:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-remove-if-ALL-selection-is-selected-in-multiselect-based/m-p/496957#M32531</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2020-01-30T09:22:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove if ALL selection is selected in multiselect based on field for label not by Value?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-remove-if-ALL-selection-is-selected-in-multiselect-based/m-p/496958#M32532</link>
      <description>&lt;P&gt;@kamlesh_vaghela  "All Shops" values is not a static configured value. it will be search result value fieldlabel.&lt;/P&gt;

&lt;P&gt;the All Shops value will be coming from results .&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;   &amp;lt;label&amp;gt;Multiselect Remove All&amp;lt;/label&amp;gt;
   &amp;lt;fieldset submitButton="false"&amp;gt;
     &amp;lt;input type="multiselect" token="multiselect" id="multiselectId"&amp;gt;
       &amp;lt;label&amp;gt;Multi Select&amp;lt;/label&amp;gt;
       &amp;lt;query&amp;gt;|inputlookup  &amp;lt;query&amp;gt;
     &amp;lt;/input&amp;gt;
   &amp;lt;/fieldset&amp;gt;
 &amp;lt;/form&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 30 Jan 2020 11:16:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-remove-if-ALL-selection-is-selected-in-multiselect-based/m-p/496958#M32532</guid>
      <dc:creator>DataOrg</dc:creator>
      <dc:date>2020-01-30T11:16:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove if ALL selection is selected in multiselect based on field for label not by Value?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-remove-if-ALL-selection-is-selected-in-multiselect-based/m-p/496959#M32533</link>
      <description>&lt;P&gt;@premranjithj&lt;/P&gt;

&lt;P&gt;Can you please share your XML?&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jan 2020 10:30:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-remove-if-ALL-selection-is-selected-in-multiselect-based/m-p/496959#M32533</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2020-01-31T10:30:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove if ALL selection is selected in multiselect based on field for label not by Value?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-remove-if-ALL-selection-is-selected-in-multiselect-based/m-p/496960#M32534</link>
      <description>&lt;P&gt;the SPL in multiselect wil return 3 values. &lt;BR /&gt;
1. host1&lt;BR /&gt;
2. host2&lt;BR /&gt;
3. All hosts(host1,host2)&lt;/P&gt;

&lt;P&gt;ALL option is not configured in Static values. the above JS not working if value is not configured in static&lt;BR /&gt;
So if all host is selected other 2 selection should be removed from selection .&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;        &amp;lt;label&amp;gt;Select &amp;lt;/label&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;| inputlookup new.csv|top 2&amp;lt;/query&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;fieldForLabel&amp;gt;Servers&amp;lt;/fieldForLabel&amp;gt;
        &amp;lt;fieldForValue&amp;gt;host&amp;lt;/fieldForValue&amp;gt;
        &amp;lt;delimiter&amp;gt;,&amp;lt;/delimiter&amp;gt;
              &amp;lt;/input&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 31 Jan 2020 12:49:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-remove-if-ALL-selection-is-selected-in-multiselect-based/m-p/496960#M32534</guid>
      <dc:creator>DataOrg</dc:creator>
      <dc:date>2020-01-31T12:49:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove if ALL selection is selected in multiselect based on field for label not by Value?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-remove-if-ALL-selection-is-selected-in-multiselect-based/m-p/496961#M32535</link>
      <description>&lt;P&gt;@premranjithj&lt;/P&gt;

&lt;P&gt;Few questions:&lt;BR /&gt;
1) Is it your full XML? &lt;BR /&gt;
2)  Does &lt;CODE&gt;| inputlookup new.csv&lt;/CODE&gt; includes &lt;CODE&gt;All hosts&lt;/CODE&gt; as server and &lt;CODE&gt;host1,host2&lt;/CODE&gt; as values? Can you please share more detail about that?&lt;BR /&gt;
3) What should be your expected output/token value if any select &lt;CODE&gt;host1&lt;/CODE&gt; OR &lt;CODE&gt;host1&lt;/CODE&gt; &amp;amp; &lt;CODE&gt;host2&lt;/CODE&gt; OR    &lt;CODE&gt;All hosts&lt;/CODE&gt; ?  &lt;/P&gt;</description>
      <pubDate>Mon, 03 Feb 2020 08:24:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-remove-if-ALL-selection-is-selected-in-multiselect-based/m-p/496961#M32535</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2020-02-03T08:24:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove if ALL selection is selected in multiselect based on field for label not by Value?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-remove-if-ALL-selection-is-selected-in-multiselect-based/m-p/496962#M32536</link>
      <description>&lt;P&gt;@kamlesh_vaghela &lt;/P&gt;

&lt;P&gt;1.its a XML dashboard&lt;BR /&gt;
1. no, lookupsheet doesnt have "All hosts". it will be populated in search&lt;BR /&gt;
3.if indiviual host is selected it will be single value &lt;BR /&gt;
.host1="ABC" &lt;BR /&gt;
host2="BBC" &lt;BR /&gt;
All hosts=("ABC","BBC")&lt;/P&gt;

&lt;P&gt;SPL:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup lookupsheet.csv| search Name IN ($Name$) | dedup Servers | table Servers | sort Servers | append[| inputlookup lookupsheet.csv| | search Name IN ($NAME$) | dedup Servers | table Servers | eval host="\"".Servers."\"" | stats delim="," values(host) AS host | mvcombine host] | eval host=if(host!="*",host,Servers) | fillnull value="ALL Servers" | sort Servers

&amp;lt;fieldForLabel&amp;gt;Servers&amp;lt;/fieldForLabel&amp;gt;
        &amp;lt;fieldForValue&amp;gt;host&amp;lt;/fieldForValue&amp;gt;
        &amp;lt;delimiter&amp;gt;,&amp;lt;/delimiter&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;output:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;fieldforLabel            fieldforValue
ABC                              ABC
BBC                              BBC
All Sites                        "ABC","BBC"   
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 03 Feb 2020 10:23:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-remove-if-ALL-selection-is-selected-in-multiselect-based/m-p/496962#M32536</guid>
      <dc:creator>DataOrg</dc:creator>
      <dc:date>2020-02-03T10:23:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove if ALL selection is selected in multiselect based on field for label not by Value?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-remove-if-ALL-selection-is-selected-in-multiselect-based/m-p/496963#M32537</link>
      <description>&lt;P&gt;@premranjithj&lt;/P&gt;

&lt;P&gt;As with your custom requirement, I suggest you to go with custom approach.  Here you need to set separate token for the condition which will gives you required string of condition.&lt;/P&gt;

&lt;P&gt;Like. &lt;BR /&gt;
If you select &lt;CODE&gt;Server 1&lt;/CODE&gt;  then condition will be &lt;CODE&gt;host="Server 1"&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;If you select &lt;CODE&gt;Server 2&lt;/CODE&gt;  then condition will be &lt;CODE&gt;host="Server 2"&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;If you select &lt;CODE&gt;Server 1&lt;/CODE&gt; &amp;amp; &lt;CODE&gt;Server 2&lt;/CODE&gt;  then condition will be &lt;CODE&gt;host="Server 1" OR host="Server 2"&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;If you select &lt;CODE&gt;All Server&lt;/CODE&gt; then condition will be &lt;CODE&gt;host="Server 1" OR host="Server 2" OR ... ... so on&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;Note: Here &lt;CODE&gt;host&lt;/CODE&gt; is condition field name which you can change as per your requirement.&lt;/P&gt;

&lt;P&gt;Another point, I have changed dropdown search and removed `All Server' and temporarily plotted in XML ( After we can set in search if below code works for you) . So change changes your search accordingly.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;| inputlookup lookupsheet.csv | search Name IN ($Name$) | dedup Servers | table Servers | sort Servers&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;JavaScript Code:&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;require([
    'underscore',
    'splunkjs/mvc',
    'splunkjs/mvc/simplexml/ready!'], function (_, mvc) {

    var multiselectsearch = mvc.Components.get("multiselectsearch");
    var submitted_tokens = mvc.Components.getInstance('submitted');
    var default_token_model = mvc.Components.getInstance('default');

    var multiselectsearch_results = multiselectsearch.data("preview");

    var fieldForFilter = "host";
    var AllCondition = ""; 
    multiselectsearch_results.on("data", function () {
        $.each(multiselectsearch_results.data().rows, function (i, value) {
            if(AllCondition!="") {
                AllCondition+="OR "
            }
            AllCondition = AllCondition + fieldForFilter + '="' + value[0] +'" ';
        });
    });

    var multiselect = splunkjs.mvc.Components.getInstance("multiselectId");
    multiselect.on("change", function (value) {
        var Condition = "";
        $.map(value, function(item,i) {
            if(item!="*") {
                if(Condition!="") {
                    Condition+="OR "
                }
                Condition = Condition + fieldForFilter + '="' + item +'" ';
            }
        });
        console.log(Condition);

        if (value.length &amp;gt; 1 &amp;amp;&amp;amp; ~(value.indexOf("*"))) {
            if (value.indexOf("*") == 0) {
                value.splice(value.indexOf("*"), 1);
                this.val(value);
                default_token_model.set("multiselectCondition", Condition);
            } else {
                this.val("*");
                default_token_model.set("multiselectCondition", AllCondition);    
            }
            this.render();
        } else if(value.length == 0) {
            default_token_model.unset("multiselectCondition");
        }
        else {
            default_token_model.set("multiselectCondition", AllCondition);
        }
        submitted_tokens.set(default_token_model.toJSON());
    })
});
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;XML Code:&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;form script="myscript.js"&amp;gt;
  &amp;lt;label&amp;gt;Multiselect Remove All&amp;lt;/label&amp;gt;
  &amp;lt;fieldset submitButton="false"&amp;gt;
    &amp;lt;input type="multiselect" token="multiselect" id="multiselectId"&amp;gt;
      &amp;lt;label&amp;gt;Multi Select&amp;lt;/label&amp;gt;
      &amp;lt;delimiter&amp;gt; ,&amp;lt;/delimiter&amp;gt;
      &amp;lt;fieldForLabel&amp;gt;Servers&amp;lt;/fieldForLabel&amp;gt;
      &amp;lt;fieldForValue&amp;gt;Servers&amp;lt;/fieldForValue&amp;gt;
      &amp;lt;search id="multiselectsearch"&amp;gt;
        &amp;lt;query&amp;gt;| makeresults | eval Servers="Server 1" | append [| makeresults | eval Servers="Server 2"]| table Servers&amp;lt;/query&amp;gt;
      &amp;lt;/search&amp;gt;
      &amp;lt;choice value="*"&amp;gt;All Hosts&amp;lt;/choice&amp;gt;
    &amp;lt;/input&amp;gt;
  &amp;lt;/fieldset&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;html&amp;gt;
        &amp;lt;code&amp;gt;multiselectCondition : &amp;lt;/code&amp;gt; $multiselectCondition$ &amp;amp;lt;br/&amp;amp;gt;
      &amp;lt;/html&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/form&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Just create new dashboard with above code execute it. I'm sure your will get the trick behind it.&lt;/P&gt;

&lt;P&gt;Note: we will check ordering of dropdown search.  &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; &lt;/P&gt;</description>
      <pubDate>Mon, 03 Feb 2020 12:34:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-remove-if-ALL-selection-is-selected-in-multiselect-based/m-p/496963#M32537</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2020-02-03T12:34:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove if ALL selection is selected in multiselect based on field for label not by Value?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-remove-if-ALL-selection-is-selected-in-multiselect-based/m-p/496964#M32538</link>
      <description>&lt;P&gt;Use &lt;CODE&gt;multiselectCondition&lt;/CODE&gt; token as multiselect value in other searches. &lt;/P&gt;</description>
      <pubDate>Mon, 03 Feb 2020 12:38:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-remove-if-ALL-selection-is-selected-in-multiselect-based/m-p/496964#M32538</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2020-02-03T12:38:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove if ALL selection is selected in multiselect based on field for label not by Value?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-remove-if-ALL-selection-is-selected-in-multiselect-based/m-p/496965#M32539</link>
      <description>&lt;P&gt;@kamlesh_vaghela &lt;BR /&gt;
 sometimes the token values are not refreshing , it shows all the server even if one is selected. check on the image.&lt;BR /&gt;
token was not refreshing properly and sometimes randomly works properly&lt;/P&gt;

&lt;P&gt;output1 is on the link : &lt;A href="https://imgur.com/rykvF55"&gt;https://imgur.com/rykvF55&lt;/A&gt;&lt;BR /&gt;
selected Server2 on the multiselect&lt;BR /&gt;
multiselectCondition : host="Server 1" OR host="Server 2" &lt;BR /&gt;&lt;BR /&gt;
instead of one output i am getting two servers&lt;/P&gt;

&lt;P&gt;output2: works correctly on selecting server1 &lt;BR /&gt;
link: &lt;A href="https://imgur.com/RF3AeJh"&gt;https://imgur.com/RF3AeJh&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Feb 2020 17:20:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-remove-if-ALL-selection-is-selected-in-multiselect-based/m-p/496965#M32539</guid>
      <dc:creator>DataOrg</dc:creator>
      <dc:date>2020-02-03T17:20:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove if ALL selection is selected in multiselect based on field for label not by Value?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-remove-if-ALL-selection-is-selected-in-multiselect-based/m-p/496966#M32540</link>
      <description>&lt;P&gt;@kamlesh_vaghela , can you please help here&lt;/P&gt;</description>
      <pubDate>Tue, 04 Feb 2020 07:13:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-remove-if-ALL-selection-is-selected-in-multiselect-based/m-p/496966#M32540</guid>
      <dc:creator>DataOrg</dc:creator>
      <dc:date>2020-02-04T07:13:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove if ALL selection is selected in multiselect based on field for label not by Value?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-remove-if-ALL-selection-is-selected-in-multiselect-based/m-p/496967#M32541</link>
      <description>&lt;P&gt;@premranjithj I'm debugging it. I'll update JS and will share with you.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Feb 2020 07:23:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-remove-if-ALL-selection-is-selected-in-multiselect-based/m-p/496967#M32541</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2020-02-04T07:23:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove if ALL selection is selected in multiselect based on field for label not by Value?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-remove-if-ALL-selection-is-selected-in-multiselect-based/m-p/496968#M32542</link>
      <description>&lt;P&gt;@premranjithj&lt;/P&gt;

&lt;P&gt;Can you please try this JS?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;require([
    'underscore',
    'splunkjs/mvc',
    'splunkjs/mvc/simplexml/ready!'], function (_, mvc) {

    var multiselectsearch = mvc.Components.get("multiselectsearch");
    var submitted_tokens = mvc.Components.getInstance('submitted');
    var default_token_model = mvc.Components.getInstance('default');

    var multiselectsearch_results = multiselectsearch.data("preview");

    var fieldForFilter = "host";
    var AllCondition = ""; 
    multiselectsearch_results.on("data", function () {
        $.each(multiselectsearch_results.data().rows, function (i, value) {
            if(AllCondition!="") {
                AllCondition+="OR "
            }
            AllCondition = AllCondition + fieldForFilter + '="' + value[0] +'" ';
        });
    });

    var multiselect = splunkjs.mvc.Components.getInstance("multiselectId");
    multiselect.on("change", function (value) {
        var Condition = "";
        $.map(value, function(item,i) {
            if(item!="*") {
                if(Condition!="") {
                    Condition+="OR "
                }
                Condition = Condition + fieldForFilter + '="' + item +'" ';
            }
        });

        if (value.length &amp;gt; 1 &amp;amp;&amp;amp; ~(value.indexOf("*"))) {
            if (value.indexOf("*") == 0) {
                value.splice(value.indexOf("*"), 1);
                this.val(value);
                default_token_model.set("multiselectCondition", Condition);
            } else {
                this.val("*");
                default_token_model.set("multiselectCondition", AllCondition);    
            }
            this.render();
        } 
        else {
            if(value.indexOf("*") == 0) {
                default_token_model.set("multiselectCondition", AllCondition);    
            }
            else {
                if(Condition.length==0) {
                    default_token_model.unset("multiselectCondition");
                } else {
                    default_token_model.set("multiselectCondition", Condition);
                }
            }
        }
        submitted_tokens.set(default_token_model.toJSON());
    })
});
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 04 Feb 2020 09:25:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-remove-if-ALL-selection-is-selected-in-multiselect-based/m-p/496968#M32542</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2020-02-04T09:25:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove if ALL selection is selected in multiselect based on field for label not by Value?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-remove-if-ALL-selection-is-selected-in-multiselect-based/m-p/496969#M32543</link>
      <description>&lt;P&gt;@kamlesh_vaghela thanks much for your effort, its working awesome . could you please change your comment into answer. i will accept it&lt;/P&gt;</description>
      <pubDate>Wed, 05 Feb 2020 06:24:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-remove-if-ALL-selection-is-selected-in-multiselect-based/m-p/496969#M32543</guid>
      <dc:creator>DataOrg</dc:creator>
      <dc:date>2020-02-05T06:24:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove if ALL selection is selected in multiselect based on field for label not by Value?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-remove-if-ALL-selection-is-selected-in-multiselect-based/m-p/496970#M32544</link>
      <description>&lt;P&gt;Great @premranjithj. You can upvote &amp;amp; accept the answer. I will consolidate all the comments and update the answer. So other Splunker also check that. You can also upvote those comments, which you think are adding value in knowledge base. &lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Happy Splunking&lt;/STRONG&gt;&lt;BR /&gt;
:) &lt;/P&gt;</description>
      <pubDate>Wed, 05 Feb 2020 07:19:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-remove-if-ALL-selection-is-selected-in-multiselect-based/m-p/496970#M32544</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2020-02-05T07:19:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove if ALL selection is selected in multiselect based on field for label not by Value?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-remove-if-ALL-selection-is-selected-in-multiselect-based/m-p/496971#M32545</link>
      <description>&lt;P&gt;@kamlesh_vaghela , if i want to unset the values of multiselect2 which has the token value "$multiselectCondition$". how to do it?&lt;/P&gt;

&lt;P&gt;below set is not working when the value is passed from JS.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;multiselect1&amp;gt;
    &amp;lt;change&amp;gt;
    &amp;lt;unset token="form.multiselectCondition"&amp;gt; &amp;lt;/unset&amp;gt;
    &amp;lt;/change&amp;gt;
    &amp;lt;/multiselect1&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 09 Mar 2020 10:34:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-remove-if-ALL-selection-is-selected-in-multiselect-based/m-p/496971#M32545</guid>
      <dc:creator>DataOrg</dc:creator>
      <dc:date>2020-03-09T10:34:37Z</dc:date>
    </item>
  </channel>
</rss>

