<?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: Remove ALL from multi-select input once any value is selected in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Remove-ALL-from-multi-select-input-once-any-value-is-selected/m-p/711189#M58189</link>
    <description>&lt;P&gt;In which component ( I mean deployer or direct search head) I need to give this JS? can you please specify full path?&lt;/P&gt;</description>
    <pubDate>Mon, 10 Feb 2025 17:12:00 GMT</pubDate>
    <dc:creator>Karthikeya</dc:creator>
    <dc:date>2025-02-10T17:12:00Z</dc:date>
    <item>
      <title>Remove ALL from multi-select input once any value is selected</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Remove-ALL-from-multi-select-input-once-any-value-is-selected/m-p/711161#M58183</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have a requirement in dashboard. My multiselect input should remove ALL (default value) if I select any value other than that automatically and ALL should return if I deselect the selected value... Please help me to get this result?&lt;/P&gt;&lt;P&gt;&amp;lt;input type="multiselect" token="app_name"&amp;gt;&lt;BR /&gt;&amp;lt;label&amp;gt;Application Name&amp;lt;/label&amp;gt;&lt;BR /&gt;&amp;lt;choice value="*"&amp;gt;All&amp;lt;/choice&amp;gt;&lt;BR /&gt;&amp;lt;default&amp;gt;*&amp;lt;/default&amp;gt;&lt;BR /&gt;&amp;lt;initialValue&amp;gt;*&amp;lt;/initialValue&amp;gt;&lt;BR /&gt;&amp;lt;fieldForLabel&amp;gt;app_name&amp;lt;/fieldForLabel&amp;gt;&lt;BR /&gt;&amp;lt;fieldForValue&amp;gt;app_name&amp;lt;/fieldForValue&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;search base="base_search"&amp;gt;&lt;BR /&gt;&amp;lt;query&amp;gt; |stats count by app_name &amp;lt;/query&amp;gt;&lt;BR /&gt;&amp;lt;/search&amp;gt;&lt;BR /&gt;&amp;lt;valuePrefix&amp;gt;app_name="&amp;lt;/valuePrefix&amp;gt;&lt;BR /&gt;&amp;lt;valueSuffix&amp;gt;"&amp;lt;/valueSuffix&amp;gt;&lt;BR /&gt;&amp;lt;delimiter&amp;gt; OR &amp;lt;/delimiter&amp;gt;&lt;BR /&gt;&amp;lt;/input&amp;gt;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Feb 2025 14:25:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Remove-ALL-from-multi-select-input-once-any-value-is-selected/m-p/711161#M58183</guid>
      <dc:creator>Karthikeya</dc:creator>
      <dc:date>2025-02-10T14:25:51Z</dc:date>
    </item>
    <item>
      <title>Re: Remove ALL from multi-select input once any value is selected</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Remove-ALL-from-multi-select-input-once-any-value-is-selected/m-p/711180#M58186</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/273888"&gt;@Karthikeya&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To achieve this you are probably best using some Javascript, have a look at these two links as I think they contain working examples for you to use:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.splunk.com/t5/Dashboards-Visualizations/Remove-quot-All-quot-from-Multiselect-Input-in-Dashboard/m-p/301375" target="_blank" rel="noopener"&gt;https://community.splunk.com/t5/Dashboards-Visualizations/Remove-quot-All-quot-from-Multiselect-Input-in-Dashboard/m-p/301375&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.splunk.com/t5/Dashboards-Visualizations/How-to-get-rid-of-default-quot-All-quot-from-Multiselect-filter/m-p/638796/highlight/true" target="_blank" rel="noopener"&gt;https://community.splunk.com/t5/Dashboards-Visualizations/How-to-get-rid-of-default-quot-All-quot-from-Multiselect-filter/m-p/638796/highlight/true&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please let me know how you get on and consider upvoting/karma this answer if it has helped.&lt;BR /&gt;Regards&lt;/P&gt;&lt;P&gt;Will&lt;/P&gt;</description>
      <pubDate>Mon, 10 Feb 2025 16:49:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Remove-ALL-from-multi-select-input-once-any-value-is-selected/m-p/711180#M58186</guid>
      <dc:creator>livehybrid</dc:creator>
      <dc:date>2025-02-10T16:49:40Z</dc:date>
    </item>
    <item>
      <title>Re: Remove ALL from multi-select input once any value is selected</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Remove-ALL-from-multi-select-input-once-any-value-is-selected/m-p/711186#M58187</link>
      <description>&lt;P&gt;Essentially you need to create the following in a allSelect.js file in&amp;nbsp;&lt;SPAN&gt;appname/appserver/static&lt;/SPAN&gt;:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;require([
     'jquery',
     'splunkjs/mvc',
     'splunkjs/mvc/simplexml/ready!'
 ], function($, mvc){
         $('#multi').on("change",function(){
                 var multi1 = mvc.Components.get("multi");
                 var tokens = mvc.Components.getInstance("default");
                 var mytoken = tokens.get("multi")

                  if (mytoken.length &amp;gt; 1 &amp;amp;&amp;amp; mytoken.includes("All"))
                 {
                     // If "All" was selected before current (more specific) selection, remove it from list
                     if (indexOfAll == 0) 
                     {
                         var temp = mytoken.split(" ")
                         var temp1 = temp[1]
                         multi1.val(temp1);
                     } else 
                     {
                         // "All" was selected last, clear input and leave only "All" in it
                         multi1.val("All");
                     }
                 }


 }); 
 }); &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then update the first line of your dashboard to something like this:&lt;/P&gt;&lt;PRE&gt;&amp;lt;form script="allSelect.js"&amp;gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Feb 2025 16:59:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Remove-ALL-from-multi-select-input-once-any-value-is-selected/m-p/711186#M58187</guid>
      <dc:creator>livehybrid</dc:creator>
      <dc:date>2025-02-10T16:59:20Z</dc:date>
    </item>
    <item>
      <title>Re: Remove ALL from multi-select input once any value is selected</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Remove-ALL-from-multi-select-input-once-any-value-is-selected/m-p/711189#M58189</link>
      <description>&lt;P&gt;In which component ( I mean deployer or direct search head) I need to give this JS? can you please specify full path?&lt;/P&gt;</description>
      <pubDate>Mon, 10 Feb 2025 17:12:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Remove-ALL-from-multi-select-input-once-any-value-is-selected/m-p/711189#M58189</guid>
      <dc:creator>Karthikeya</dc:creator>
      <dc:date>2025-02-10T17:12:00Z</dc:date>
    </item>
    <item>
      <title>Re: Remove ALL from multi-select input once any value is selected</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Remove-ALL-from-multi-select-input-once-any-value-is-selected/m-p/711191#M58190</link>
      <description>&lt;P&gt;You can do this without javascript - here is a SimpleXML example&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;    &amp;lt;input type="multiselect" token="alloptions" searchWhenChanged="true"&amp;gt;
      &amp;lt;label&amp;gt;Options $alloptions$&amp;lt;/label&amp;gt;
      &amp;lt;choice value="All"&amp;gt;All&amp;lt;/choice&amp;gt;
      &amp;lt;search&amp;gt;
        &amp;lt;query&amp;gt;
| makeresults count=20
| streamstats count as row
| eval option="Option ".mvindex(split("ABCDEFGHIJKLMNOPQRSTUVWXYZ",""),row-1)
| eval label="Option ".mvindex(split("abcdefghijklmnopqrstuvwxyz",""),row-1)
| table option label
        &amp;lt;/query&amp;gt;
      &amp;lt;/search&amp;gt;
      &amp;lt;fieldForLabel&amp;gt;label&amp;lt;/fieldForLabel&amp;gt;
      &amp;lt;fieldForValue&amp;gt;option&amp;lt;/fieldForValue&amp;gt;
      &amp;lt;delimiter&amp;gt;,&amp;lt;/delimiter&amp;gt;
      &amp;lt;change&amp;gt;
        &amp;lt;eval token="form.alloptions"&amp;gt;case(mvcount('form.alloptions')=0,"All",mvcount('form.alloptions')&amp;amp;gt;1 AND mvfind('form.alloptions',"All")&amp;amp;gt;0,"All",mvcount('form.alloptions')&amp;amp;gt;1 AND mvfind('form.alloptions',"All")=0,mvfilter('form.alloptions'!="All"),1==1,'form.alloptions')&amp;lt;/eval&amp;gt;
      &amp;lt;/change&amp;gt;
    &amp;lt;/input&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Feb 2025 17:27:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Remove-ALL-from-multi-select-input-once-any-value-is-selected/m-p/711191#M58190</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2025-02-10T17:27:00Z</dc:date>
    </item>
    <item>
      <title>Re: Remove ALL from multi-select input once any value is selected</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Remove-ALL-from-multi-select-input-once-any-value-is-selected/m-p/711195#M58191</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;thanks for the reply. Where I need to give this input? In my existing multiselect input?&lt;/P&gt;</description>
      <pubDate>Mon, 10 Feb 2025 17:50:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Remove-ALL-from-multi-select-input-once-any-value-is-selected/m-p/711195#M58191</guid>
      <dc:creator>Karthikeya</dc:creator>
      <dc:date>2025-02-10T17:50:25Z</dc:date>
    </item>
    <item>
      <title>Re: Remove ALL from multi-select input once any value is selected</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Remove-ALL-from-multi-select-input-once-any-value-is-selected/m-p/711196#M58192</link>
      <description>&lt;P&gt;Here is my existing multiselect XML..&lt;/P&gt;&lt;P&gt;&amp;lt;input type="multiselect" token="app_name"&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;label&amp;gt;Application Name&amp;lt;/label&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;choice value="*"&amp;gt;All&amp;lt;/choice&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;default&amp;gt;*&amp;lt;/default&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;initialValue&amp;gt;*&amp;lt;/initialValue&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;fieldForLabel&amp;gt;app_name&amp;lt;/fieldForLabel&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;fieldForValue&amp;gt;app_name&amp;lt;/fieldForValue&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;lt;search base="base_search"&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;query&amp;gt; |stats count by app_name &amp;lt;/query&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;/search&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;valuePrefix&amp;gt;app_name="&amp;lt;/valuePrefix&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;valueSuffix&amp;gt;"&amp;lt;/valueSuffix&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;delimiter&amp;gt; OR &amp;lt;/delimiter&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;/input&amp;gt;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Feb 2025 17:51:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Remove-ALL-from-multi-select-input-once-any-value-is-selected/m-p/711196#M58192</guid>
      <dc:creator>Karthikeya</dc:creator>
      <dc:date>2025-02-10T17:51:30Z</dc:date>
    </item>
    <item>
      <title>Re: Remove ALL from multi-select input once any value is selected</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Remove-ALL-from-multi-select-input-once-any-value-is-selected/m-p/711199#M58193</link>
      <description>&lt;P&gt;I don't think you actually want to remove "ALL" from the multi-select...it makes it so people can go back to the default when they are done with whatever choice they made originally.&amp;nbsp; I would say if you don't want people to go back to the default...then maybe you don't it there at all in the first place?&amp;nbsp; Or maybe you don't actually want a multi-select but just a regular drop-down list?&amp;nbsp; But it seems to me if you want it there in the first place, you actually want it there always so people can revert back to the default behavior of the dashboard when they are done messing around&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt; (IMO).&lt;/P&gt;</description>
      <pubDate>Mon, 10 Feb 2025 18:01:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Remove-ALL-from-multi-select-input-once-any-value-is-selected/m-p/711199#M58193</guid>
      <dc:creator>marycordova</dc:creator>
      <dc:date>2025-02-10T18:01:46Z</dc:date>
    </item>
    <item>
      <title>Re: Remove ALL from multi-select input once any value is selected</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Remove-ALL-from-multi-select-input-once-any-value-is-selected/m-p/711215#M58194</link>
      <description>&lt;P&gt;Try like this - note that your search needs to use the $app_name_choice$ token not $app_name$&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;    &amp;lt;input type="multiselect" token="app_name"&amp;gt;
      &amp;lt;label&amp;gt;Application Name&amp;lt;/label&amp;gt;
      &amp;lt;choice value="All"&amp;gt;All&amp;lt;/choice&amp;gt;
      &amp;lt;default&amp;gt;All&amp;lt;/default&amp;gt;
      &amp;lt;initialValue&amp;gt;*&amp;lt;/initialValue&amp;gt;
      &amp;lt;fieldForLabel&amp;gt;app_name&amp;lt;/fieldForLabel&amp;gt;
      &amp;lt;fieldForValue&amp;gt;app_name&amp;lt;/fieldForValue&amp;gt;
      &amp;lt;search base="base_search"&amp;gt;
        &amp;lt;query&amp;gt; |stats count by app_name &amp;lt;/query&amp;gt;
      &amp;lt;/search&amp;gt;
      &amp;lt;valuePrefix&amp;gt;app_name="&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;change&amp;gt;
        &amp;lt;eval token="form.app_name"&amp;gt;case(mvcount('form.app_name')=0,"All",mvcount('form.app_name')&amp;amp;gt;1 AND mvfind('form.app_name',"All")&amp;amp;gt;0,"All",mvcount('form.app_name')&amp;amp;gt;1 AND mvfind('form.app_name',"All")=0,mvfilter('form.app_name'!="All"),1==1,'form.app_name')&amp;lt;/eval&amp;gt;
        &amp;lt;eval token="app_name_choice"&amp;gt;if('form.app_name'=="All","app_name=\"*\"",'app_name')&amp;lt;/eval&amp;gt;
      &amp;lt;/change&amp;gt;
    &amp;lt;/input&amp;gt;&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 10 Feb 2025 23:12:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Remove-ALL-from-multi-select-input-once-any-value-is-selected/m-p/711215#M58194</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2025-02-10T23:12:22Z</dc:date>
    </item>
    <item>
      <title>Re: Remove ALL from multi-select input once any value is selected</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Remove-ALL-from-multi-select-input-once-any-value-is-selected/m-p/711253#M58196</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;thanks for the code. It is working but my doubt as per your comment - do I replace $app_name$ token with&amp;nbsp;&lt;SPAN&gt;$app_name_choice$ in all my panels? Because even though I didn't change my panels are refreshing at the moment according to multiselect options given. Please confirm do I need to replace?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Feb 2025 10:59:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Remove-ALL-from-multi-select-input-once-any-value-is-selected/m-p/711253#M58196</guid>
      <dc:creator>Karthikeya</dc:creator>
      <dc:date>2025-02-11T10:59:04Z</dc:date>
    </item>
    <item>
      <title>Re: Remove ALL from multi-select input once any value is selected</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Remove-ALL-from-multi-select-input-once-any-value-is-selected/m-p/711262#M58197</link>
      <description>&lt;P&gt;You probably do need to use app_name_choice in your panels if you want the All option to be converted to * otherwise your search will be for app_name="All" which is probably not what you want!&lt;/P&gt;</description>
      <pubDate>Tue, 11 Feb 2025 13:08:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Remove-ALL-from-multi-select-input-once-any-value-is-selected/m-p/711262#M58197</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2025-02-11T13:08:14Z</dc:date>
    </item>
  </channel>
</rss>

