<?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 Open or Close panel based on value of token created in another panel in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Open-or-Close-panel-based-on-value-of-token-created-in-another/m-p/707555#M57895</link>
    <description>&lt;P&gt;Hello dear Splunkers!&lt;/P&gt;&lt;P&gt;I am struggling with this issue for days and just can't resolve it (ChatGPT is clueless).&lt;/P&gt;&lt;P&gt;I have a panel that displays a trellis pie chart (splitted by a field called MODULE), and the panel has a drilldown that creates the token $module$.&lt;/P&gt;&lt;P&gt;I need to open another panel only if the value inside $module$ equals to "AAA". Otherwise, I need to open a different panel.&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;- If I click on the pie chart on the value MODULE="AAA" -&amp;gt; A panel called "ModuleA" is opened.&lt;/P&gt;&lt;P&gt;- If I click on the pie chart on the value MODULE="BBB" (or any other value) -&amp;gt;&amp;nbsp; A panel called "ModuleOther" is opened.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Right now I tried everything I could find on the internet/from the brain/from ChatGPT, but nothing works.&lt;/P&gt;&lt;P&gt;Here's my code for now:&lt;/P&gt;&lt;PRE&gt;&amp;lt;drilldown&amp;gt;&lt;BR /&gt;    &amp;lt;condition&amp;gt;&lt;BR /&gt;        &amp;lt;case match="AAA"&amp;gt;&lt;BR /&gt;            &amp;lt;set token="ModuleA"&amp;gt;true&amp;lt;/set&amp;gt;&lt;BR /&gt;            &amp;lt;unset token="ModuleOther"&amp;gt;&amp;lt;/unset&amp;gt;&lt;BR /&gt;        &amp;lt;/case&amp;gt;&lt;BR /&gt;        &amp;lt;default&amp;gt;&lt;BR /&gt;            &amp;lt;unset token="ModuleA"&amp;gt;&amp;lt;/unset&amp;gt;&lt;BR /&gt;            &amp;lt;set token="ModuleOther"&amp;gt;$trellis.value$&amp;lt;/set&amp;gt;&lt;BR /&gt;        &amp;lt;/default&amp;gt;&lt;BR /&gt;    &amp;lt;/condition&amp;gt;&lt;BR /&gt;&amp;lt;/drilldown&amp;gt;&lt;BR /&gt;...&lt;BR /&gt;&amp;lt;!-- panel A is opened --&amp;gt;&lt;BR /&gt;&amp;lt;panel depends="$ModuleA$"&amp;gt;&lt;BR /&gt;    ...&lt;BR /&gt;&amp;lt;/panel&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&amp;lt;!-- panel Other is opened --&amp;gt;&lt;BR /&gt;&amp;lt;panel depends="$ModuleOther$"&amp;gt;&lt;BR /&gt;    ...&lt;BR /&gt;&amp;lt;/panel&amp;gt;&lt;/PRE&gt;&lt;P&gt;It doesn't work since the tokens don't even contain a value when clicked on the pie.&lt;/P&gt;&lt;P&gt;I even added a text input for each token in order to check if they contain any value when click, and the answer is no.&lt;/P&gt;&lt;P&gt;It's important to emphasize that when I tried to make it a simple drilldown and open one panel when any pie is clicked it worked just fine. The problem is with the conditional tokening.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance!!&lt;/P&gt;</description>
    <pubDate>Wed, 25 Dec 2024 12:10:20 GMT</pubDate>
    <dc:creator>eyalmanuelharel</dc:creator>
    <dc:date>2024-12-25T12:10:20Z</dc:date>
    <item>
      <title>Open or Close panel based on value of token created in another panel</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Open-or-Close-panel-based-on-value-of-token-created-in-another/m-p/707555#M57895</link>
      <description>&lt;P&gt;Hello dear Splunkers!&lt;/P&gt;&lt;P&gt;I am struggling with this issue for days and just can't resolve it (ChatGPT is clueless).&lt;/P&gt;&lt;P&gt;I have a panel that displays a trellis pie chart (splitted by a field called MODULE), and the panel has a drilldown that creates the token $module$.&lt;/P&gt;&lt;P&gt;I need to open another panel only if the value inside $module$ equals to "AAA". Otherwise, I need to open a different panel.&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;- If I click on the pie chart on the value MODULE="AAA" -&amp;gt; A panel called "ModuleA" is opened.&lt;/P&gt;&lt;P&gt;- If I click on the pie chart on the value MODULE="BBB" (or any other value) -&amp;gt;&amp;nbsp; A panel called "ModuleOther" is opened.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Right now I tried everything I could find on the internet/from the brain/from ChatGPT, but nothing works.&lt;/P&gt;&lt;P&gt;Here's my code for now:&lt;/P&gt;&lt;PRE&gt;&amp;lt;drilldown&amp;gt;&lt;BR /&gt;    &amp;lt;condition&amp;gt;&lt;BR /&gt;        &amp;lt;case match="AAA"&amp;gt;&lt;BR /&gt;            &amp;lt;set token="ModuleA"&amp;gt;true&amp;lt;/set&amp;gt;&lt;BR /&gt;            &amp;lt;unset token="ModuleOther"&amp;gt;&amp;lt;/unset&amp;gt;&lt;BR /&gt;        &amp;lt;/case&amp;gt;&lt;BR /&gt;        &amp;lt;default&amp;gt;&lt;BR /&gt;            &amp;lt;unset token="ModuleA"&amp;gt;&amp;lt;/unset&amp;gt;&lt;BR /&gt;            &amp;lt;set token="ModuleOther"&amp;gt;$trellis.value$&amp;lt;/set&amp;gt;&lt;BR /&gt;        &amp;lt;/default&amp;gt;&lt;BR /&gt;    &amp;lt;/condition&amp;gt;&lt;BR /&gt;&amp;lt;/drilldown&amp;gt;&lt;BR /&gt;...&lt;BR /&gt;&amp;lt;!-- panel A is opened --&amp;gt;&lt;BR /&gt;&amp;lt;panel depends="$ModuleA$"&amp;gt;&lt;BR /&gt;    ...&lt;BR /&gt;&amp;lt;/panel&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&amp;lt;!-- panel Other is opened --&amp;gt;&lt;BR /&gt;&amp;lt;panel depends="$ModuleOther$"&amp;gt;&lt;BR /&gt;    ...&lt;BR /&gt;&amp;lt;/panel&amp;gt;&lt;/PRE&gt;&lt;P&gt;It doesn't work since the tokens don't even contain a value when clicked on the pie.&lt;/P&gt;&lt;P&gt;I even added a text input for each token in order to check if they contain any value when click, and the answer is no.&lt;/P&gt;&lt;P&gt;It's important to emphasize that when I tried to make it a simple drilldown and open one panel when any pie is clicked it worked just fine. The problem is with the conditional tokening.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance!!&lt;/P&gt;</description>
      <pubDate>Wed, 25 Dec 2024 12:10:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Open-or-Close-panel-based-on-value-of-token-created-in-another/m-p/707555#M57895</guid>
      <dc:creator>eyalmanuelharel</dc:creator>
      <dc:date>2024-12-25T12:10:20Z</dc:date>
    </item>
    <item>
      <title>Re: Open or Close panel based on value of token created in another panel</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Open-or-Close-panel-based-on-value-of-token-created-in-another/m-p/707563#M57897</link>
      <description>&lt;P&gt;Try something like this (I am not sure if you need click.value2, value, name or name2 though, you would need to experiment&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;drilldown&amp;gt;
    &amp;lt;condition match="$click.value2$=&amp;amp;quot;AAA&amp;amp;quot;"&amp;gt;
        &amp;lt;set token="ModuleA"&amp;gt;true&amp;lt;/set&amp;gt;
        &amp;lt;unset token="ModuleOther"&amp;gt;&amp;lt;/unset&amp;gt;
    &amp;lt;/condition&amp;gt;
    &amp;lt;condition&amp;gt;
        &amp;lt;unset token="ModuleA"&amp;gt;&amp;lt;/unset&amp;gt;
        &amp;lt;set token="ModuleOther"&amp;gt;$trellis.value$&amp;lt;/set&amp;gt;
    &amp;lt;/condition&amp;gt;
&amp;lt;/drilldown&amp;gt;
...
&amp;lt;!-- panel A is opened --&amp;gt;
&amp;lt;panel depends="$ModuleA$"&amp;gt;
    ...
&amp;lt;/panel&amp;gt;

&amp;lt;!-- panel Other is opened --&amp;gt;
&amp;lt;panel depends="$ModuleOther$"&amp;gt;
    ...
&amp;lt;/panel&amp;gt;&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 25 Dec 2024 22:03:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Open-or-Close-panel-based-on-value-of-token-created-in-another/m-p/707563#M57897</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-12-25T22:03:52Z</dc:date>
    </item>
    <item>
      <title>Re: Open or Close panel based on value of token created in another panel</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Open-or-Close-panel-based-on-value-of-token-created-in-another/m-p/707599#M57899</link>
      <description>&lt;P&gt;In addition to &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;comments, there is an alternative way to set/unset pairs of tokens using the &amp;lt;eval&amp;gt; token mechanism, i.e.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;drilldown&amp;gt;
  &amp;lt;eval token="ModuleA"&amp;gt;if($click.value2$="AAA", "true", null())&amp;lt;/eval&amp;gt;
  &amp;lt;eval token="ModuleOther"&amp;gt;if($click.value2$="AAA", null(), $trellis.value$)&amp;lt;/eval&amp;gt;
&amp;lt;drilldown&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;I prefer this mechanism over &lt;STRONG&gt;&amp;lt;condition&amp;gt;&lt;/STRONG&gt;, where &lt;STRONG&gt;null()&lt;/STRONG&gt; is equivalent to unsetting a token. It avoids the &lt;STRONG&gt;&amp;amp;quot;&lt;/STRONG&gt; usage and keeps the number of lines down.&lt;/P&gt;&lt;P&gt;Again, click.value2 may not be the right one&lt;/P&gt;</description>
      <pubDate>Fri, 27 Dec 2024 02:21:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Open-or-Close-panel-based-on-value-of-token-created-in-another/m-p/707599#M57899</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2024-12-27T02:21:24Z</dc:date>
    </item>
    <item>
      <title>Re: Open or Close panel based on value of token created in another panel</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Open-or-Close-panel-based-on-value-of-token-created-in-another/m-p/707680#M57900</link>
      <description>&lt;P&gt;Wow, it worked!!&lt;/P&gt;&lt;P&gt;Thank you so much for your kind help.&lt;/P&gt;&lt;P&gt;I can't believe this is so simple and yet no other forum knew what the solution is.&lt;/P&gt;&lt;P&gt;Just a quick clarification, instead of $click.value2$ it should be $trellis.value$ since I used trellis in this panel. I am writing this for future people with the same problem.&lt;/P&gt;&lt;P&gt;Have a great day!&lt;/P&gt;</description>
      <pubDate>Sun, 29 Dec 2024 08:04:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Open-or-Close-panel-based-on-value-of-token-created-in-another/m-p/707680#M57900</guid>
      <dc:creator>eyalmanuelharel</dc:creator>
      <dc:date>2024-12-29T08:04:12Z</dc:date>
    </item>
    <item>
      <title>Re: Open or Close panel based on value of token created in another panel</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Open-or-Close-panel-based-on-value-of-token-created-in-another/m-p/707704#M57910</link>
      <description>&lt;P&gt;Just ask the "&lt;STRONG&gt;Men with the Black Fez&lt;/STRONG&gt;"&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":beaming_face_with_smiling_eyes:"&gt;😁&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="bowesmana_0-1735520918598.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/33959iC35627043DE779B2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="bowesmana_0-1735520918598.png" alt="bowesmana_0-1735520918598.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Dec 2024 01:09:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Open-or-Close-panel-based-on-value-of-token-created-in-another/m-p/707704#M57910</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2024-12-30T01:09:49Z</dc:date>
    </item>
  </channel>
</rss>

