<?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 Dropdown - set token when no selection in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Dropdown-set-token-when-no-selection/m-p/583928#M47845</link>
    <description>&lt;P&gt;Hello guys,&lt;BR /&gt;&lt;BR /&gt;I need a help with a dropdown, basically i have a dropdown based on a previous one that returns me some choice about hostnames.&lt;BR /&gt;&lt;BR /&gt;Based on this hostname i need to show some panels, but i would like that&amp;nbsp; till the user doesnt's choose one option from the dropdown nothing appear in the dasboard.&lt;BR /&gt;&lt;BR /&gt;But my token assume the "$label$" value so the depends attribute show alway what i'm trying to hide. Below the code:&lt;BR /&gt;&lt;BR /&gt;&amp;lt;input depends="$switch_type$" type="dropdown" searchWhenChanged="true" token="device_name"&amp;gt;&lt;BR /&gt;&amp;lt;label&amp;gt;Switch Name&amp;lt;/label&amp;gt;&lt;BR /&gt;&amp;lt;fieldForLabel&amp;gt;switch&amp;lt;/fieldForLabel&amp;gt;&lt;BR /&gt;&amp;lt;fieldForValue&amp;gt;hostname&amp;lt;/fieldForValue&amp;gt;&lt;BR /&gt;&amp;lt;search&amp;gt;&lt;BR /&gt;&amp;lt;query&amp;gt;"my query "&amp;lt;/query&amp;gt;&lt;BR /&gt;&amp;lt;/search&amp;gt;&lt;BR /&gt;&amp;lt;change&amp;gt;&lt;BR /&gt;&amp;lt;set token="switch"&amp;gt;$label$&amp;lt;/set&amp;gt;&lt;BR /&gt;&amp;lt;/change&amp;gt;&lt;BR /&gt;&lt;BR /&gt;I would like that till the user doesnt select something from the dropdwon the token $switch$ is false or unset, in order to be able use it on depends condition...&lt;BR /&gt;The value&amp;nbsp; that token can assume are not fixed so i can&amp;nbsp; not use custom condition..&lt;BR /&gt;&lt;BR /&gt;Thanks for the help&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 07 Feb 2022 12:21:38 GMT</pubDate>
    <dc:creator>Shaw</dc:creator>
    <dc:date>2022-02-07T12:21:38Z</dc:date>
    <item>
      <title>Dropdown - set token when no selection</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Dropdown-set-token-when-no-selection/m-p/583928#M47845</link>
      <description>&lt;P&gt;Hello guys,&lt;BR /&gt;&lt;BR /&gt;I need a help with a dropdown, basically i have a dropdown based on a previous one that returns me some choice about hostnames.&lt;BR /&gt;&lt;BR /&gt;Based on this hostname i need to show some panels, but i would like that&amp;nbsp; till the user doesnt's choose one option from the dropdown nothing appear in the dasboard.&lt;BR /&gt;&lt;BR /&gt;But my token assume the "$label$" value so the depends attribute show alway what i'm trying to hide. Below the code:&lt;BR /&gt;&lt;BR /&gt;&amp;lt;input depends="$switch_type$" type="dropdown" searchWhenChanged="true" token="device_name"&amp;gt;&lt;BR /&gt;&amp;lt;label&amp;gt;Switch Name&amp;lt;/label&amp;gt;&lt;BR /&gt;&amp;lt;fieldForLabel&amp;gt;switch&amp;lt;/fieldForLabel&amp;gt;&lt;BR /&gt;&amp;lt;fieldForValue&amp;gt;hostname&amp;lt;/fieldForValue&amp;gt;&lt;BR /&gt;&amp;lt;search&amp;gt;&lt;BR /&gt;&amp;lt;query&amp;gt;"my query "&amp;lt;/query&amp;gt;&lt;BR /&gt;&amp;lt;/search&amp;gt;&lt;BR /&gt;&amp;lt;change&amp;gt;&lt;BR /&gt;&amp;lt;set token="switch"&amp;gt;$label$&amp;lt;/set&amp;gt;&lt;BR /&gt;&amp;lt;/change&amp;gt;&lt;BR /&gt;&lt;BR /&gt;I would like that till the user doesnt select something from the dropdwon the token $switch$ is false or unset, in order to be able use it on depends condition...&lt;BR /&gt;The value&amp;nbsp; that token can assume are not fixed so i can&amp;nbsp; not use custom condition..&lt;BR /&gt;&lt;BR /&gt;Thanks for the help&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Feb 2022 12:21:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Dropdown-set-token-when-no-selection/m-p/583928#M47845</guid>
      <dc:creator>Shaw</dc:creator>
      <dc:date>2022-02-07T12:21:38Z</dc:date>
    </item>
    <item>
      <title>Re: Dropdown - set token when no selection</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Dropdown-set-token-when-no-selection/m-p/583939#M47848</link>
      <description>&lt;P&gt;Can you unset the switch token as part of the change in the previous one?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;change&amp;gt;
&amp;lt;unset token="switch"/&amp;gt;
&amp;lt;/change&amp;gt;&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 07 Feb 2022 13:28:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Dropdown-set-token-when-no-selection/m-p/583939#M47848</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-02-07T13:28:24Z</dc:date>
    </item>
    <item>
      <title>Re: Dropdown - set token when no selection</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Dropdown-set-token-when-no-selection/m-p/583940#M47849</link>
      <description>&lt;P&gt;if you intend the previos dropdwon it doesn't affect the behavior.&lt;BR /&gt;&lt;BR /&gt;The first dropdown permit to choose between: switch, router, plc ecc&lt;BR /&gt;The second dropdown permit&amp;nbsp;&amp;nbsp;to choose based on devyce type selected&amp;nbsp; the device names (that i list using a search).&lt;BR /&gt;&lt;BR /&gt;My token based on the second dropdown can assume the following values:&lt;BR /&gt;$switch$ = any names that the user click on the list shown&lt;BR /&gt;$switch$ = $label$ (if nothing is selected)&lt;/P&gt;&lt;P&gt;In a panel if use depends ="$switch$", no matter what it will always appear because the token has always a value.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Feb 2022 13:42:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Dropdown-set-token-when-no-selection/m-p/583940#M47849</guid>
      <dc:creator>Shaw</dc:creator>
      <dc:date>2022-02-07T13:42:14Z</dc:date>
    </item>
    <item>
      <title>Re: Dropdown - set token when no selection</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Dropdown-set-token-when-no-selection/m-p/583942#M47850</link>
      <description>&lt;P&gt;Correct - depends works based on the presence or absence of the token not the value of the token&lt;/P&gt;&lt;P&gt;So what I was suggesting is that, in the first dropdown, you unset the token being used by the panels in their depends until a choice is made in the second dropdown. That way, when a new type is selected (switch, router, etc.) the panels disappear until the actual switch/router is selected from the list.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Feb 2022 13:50:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Dropdown-set-token-when-no-selection/m-p/583942#M47850</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-02-07T13:50:25Z</dc:date>
    </item>
    <item>
      <title>Re: Dropdown - set token when no selection</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Dropdown-set-token-when-no-selection/m-p/583950#M47852</link>
      <description>&lt;P&gt;mmm.. i'm not understanding how to make that condition in the first dropdown..&lt;BR /&gt;should i have a new token only for the visualizations?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Suppose my first dropdown is:&lt;BR /&gt;&lt;BR /&gt;&amp;lt;input type="dropdown" token="device_type" searchWhenChanged="true"&amp;gt;&lt;BR /&gt;&amp;lt;label&amp;gt;Device Type&amp;lt;/label&amp;gt;&lt;BR /&gt;&amp;lt;choice value="switch"&amp;gt;Switch&amp;lt;/choice&amp;gt;&lt;BR /&gt;&amp;lt;choice value="router"&amp;gt;Router&amp;lt;/choice&amp;gt;&lt;BR /&gt;&amp;lt;change&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;lt;condition label="Switch"&amp;gt;&lt;BR /&gt;&amp;lt;set token="switch_type"&amp;gt;true&amp;lt;/set&amp;gt;&lt;BR /&gt;&amp;lt;unset token="router_type"&amp;gt;&amp;lt;/unset&amp;gt;&lt;BR /&gt;&amp;lt;/condition&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;lt;condition label="Router"&amp;gt;&lt;BR /&gt;&amp;lt;unset token="switch_type"&amp;gt;&amp;lt;/unset&amp;gt;&lt;BR /&gt;&amp;lt;set token="router_type"&amp;gt;true&amp;lt;/set&amp;gt;&lt;BR /&gt;&amp;lt;/condition&amp;gt;&lt;BR /&gt;&lt;BR /&gt;the second dropdown:&lt;BR /&gt;&lt;BR /&gt;&amp;lt;input depends="$switch_type$" type="dropdown" searchWhenChanged="true" token="device_name"&amp;gt;&lt;BR /&gt;&amp;lt;label&amp;gt;Switch Name&amp;lt;/label&amp;gt;&lt;BR /&gt;&amp;lt;fieldForLabel&amp;gt;switch&amp;lt;/fieldForLabel&amp;gt;&lt;BR /&gt;&amp;lt;fieldForValue&amp;gt;hostname&amp;lt;/fieldForValue&amp;gt;&lt;BR /&gt;&amp;lt;search&amp;gt;&lt;BR /&gt;&amp;lt;query&amp;gt;"retrieve list off all switch name" &amp;lt;/query&amp;gt;&lt;BR /&gt;&amp;lt;/search&amp;gt;&lt;BR /&gt;&amp;lt;change&amp;gt;&lt;BR /&gt;&amp;lt;set token="switch"&amp;gt;$label$&amp;lt;/set&amp;gt;&lt;BR /&gt;&amp;lt;/change&amp;gt;&lt;BR /&gt;&amp;lt;/input&amp;gt;&lt;BR /&gt;&lt;BR /&gt;my panel&lt;BR /&gt;&amp;lt;panel depends=???&amp;gt;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Feb 2022 14:11:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Dropdown-set-token-when-no-selection/m-p/583950#M47852</guid>
      <dc:creator>Shaw</dc:creator>
      <dc:date>2022-02-07T14:11:37Z</dc:date>
    </item>
    <item>
      <title>Re: Dropdown - set token when no selection</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Dropdown-set-token-when-no-selection/m-p/583955#M47855</link>
      <description>&lt;LI-CODE lang="markup"&gt;&amp;lt;input type="dropdown" token="device_type" searchWhenChanged="true"&amp;gt;
&amp;lt;label&amp;gt;Device Type&amp;lt;/label&amp;gt;
&amp;lt;choice value="switch"&amp;gt;Switch&amp;lt;/choice&amp;gt;
&amp;lt;choice value="router"&amp;gt;Router&amp;lt;/choice&amp;gt;
&amp;lt;change&amp;gt;


&amp;lt;condition label="Switch"&amp;gt;
&amp;lt;set token="switch_type"&amp;gt;true&amp;lt;/set&amp;gt;
&amp;lt;unset token="router_type"&amp;gt;&amp;lt;/unset&amp;gt;
&amp;lt;unset token="switch"&amp;gt;&amp;lt;/unset&amp;gt;
&amp;lt;unset token="router"&amp;gt;&amp;lt;/unset&amp;gt;
&amp;lt;/condition&amp;gt;


&amp;lt;condition label="Router"&amp;gt;
&amp;lt;unset token="switch_type"&amp;gt;&amp;lt;/unset&amp;gt;
&amp;lt;set token="router_type"&amp;gt;true&amp;lt;/set&amp;gt;
&amp;lt;unset token="switch"&amp;gt;&amp;lt;/unset&amp;gt;
&amp;lt;unset token="router"&amp;gt;&amp;lt;/unset&amp;gt;
&amp;lt;/condition&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;the second dropdown:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;input depends="$switch_type$" type="dropdown" searchWhenChanged="true" token="device_name"&amp;gt;
&amp;lt;label&amp;gt;Switch Name&amp;lt;/label&amp;gt;
&amp;lt;fieldForLabel&amp;gt;switch&amp;lt;/fieldForLabel&amp;gt;
&amp;lt;fieldForValue&amp;gt;hostname&amp;lt;/fieldForValue&amp;gt;
&amp;lt;search&amp;gt;
&amp;lt;query&amp;gt;"retrieve list off all switch name" &amp;lt;/query&amp;gt;
&amp;lt;/search&amp;gt;
&amp;lt;change&amp;gt;
&amp;lt;set token="switch"&amp;gt;$label$&amp;lt;/set&amp;gt;
&amp;lt;/change&amp;gt;
&amp;lt;/input&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;Similarly for router_type dropdown&lt;/P&gt;&lt;P&gt;Then in panels&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;panel depends="$switch$"&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;and similarly for router panel&lt;/P&gt;</description>
      <pubDate>Mon, 07 Feb 2022 14:20:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Dropdown-set-token-when-no-selection/m-p/583955#M47855</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-02-07T14:20:28Z</dc:date>
    </item>
    <item>
      <title>Re: Dropdown - set token when no selection</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Dropdown-set-token-when-no-selection/m-p/583957#M47857</link>
      <description>&lt;P&gt;mmm in the moment i choose the device type&amp;nbsp; in the first dropdown,&lt;BR /&gt;the token&amp;nbsp; $switch$ assume the value $label$&amp;nbsp; even with your integration..&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Feb 2022 14:27:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Dropdown-set-token-when-no-selection/m-p/583957#M47857</guid>
      <dc:creator>Shaw</dc:creator>
      <dc:date>2022-02-07T14:27:54Z</dc:date>
    </item>
    <item>
      <title>Re: Dropdown - set token when no selection</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Dropdown-set-token-when-no-selection/m-p/583969#M47861</link>
      <description>&lt;P&gt;Try something like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;input depends="$switch_type$" type="dropdown" searchWhenChanged="true" token="device_name"&amp;gt;
&amp;lt;label&amp;gt;Switch Name&amp;lt;/label&amp;gt;
&amp;lt;fieldForLabel&amp;gt;switch&amp;lt;/fieldForLabel&amp;gt;
&amp;lt;fieldForValue&amp;gt;hostname&amp;lt;/fieldForValue&amp;gt;
&amp;lt;search&amp;gt;
&amp;lt;query&amp;gt;"retrieve list off all switch name" &amp;lt;/query&amp;gt;
&amp;lt;/search&amp;gt;
&amp;lt;change&amp;gt;
&amp;lt;eval token="switch"&amp;gt;if(mvcount($form.device_name$)&amp;amp;gt;0,$label$,null())&amp;lt;/eval&amp;gt;
&amp;lt;/change&amp;gt;
&amp;lt;/input&amp;gt;&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 07 Feb 2022 16:26:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Dropdown-set-token-when-no-selection/m-p/583969#M47861</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-02-07T16:26:44Z</dc:date>
    </item>
    <item>
      <title>Re: Dropdown - set token when no selection</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Dropdown-set-token-when-no-selection/m-p/583987#M47863</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I had to change the null() with a false but then it does what i need!!&lt;BR /&gt;&lt;BR /&gt;Thank you so much!!&lt;/P&gt;</description>
      <pubDate>Mon, 07 Feb 2022 17:40:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Dropdown-set-token-when-no-selection/m-p/583987#M47863</guid>
      <dc:creator>Shaw</dc:creator>
      <dc:date>2022-02-07T17:40:55Z</dc:date>
    </item>
  </channel>
</rss>

