Dashboards & Visualizations

Conditional for hidden panels

JoshuaJohn
Contributor

When I click one of my panels it shows another one, I want to be able to click that original panel and re-hide the panel that is now showing.

I tried doing something like this, but couldn't get it working.

<drilldown>
  <condition NotinUse !=="true">
    <set token="NotinUse">true</set>
  </condition>
  <condition NotinUse=="true">
    <set token="NotinUse">"false"</set>
  </condition>
</drilldown>
0 Karma
1 Solution

niketn
Legend

@JosuaJohn... Please try the following:

    <drilldown>
      <condition match="$NotinUse$==&quot;true&quot;">
        <unset token="NotinUse"></unset>
      </condition>
      <condition>
        <set token="NotinUse">true</set>
      </condition>
    </drilldown>
____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

View solution in original post

0 Karma

niketn
Legend

@JosuaJohn... Please try the following:

    <drilldown>
      <condition match="$NotinUse$==&quot;true&quot;">
        <unset token="NotinUse"></unset>
      </condition>
      <condition>
        <set token="NotinUse">true</set>
      </condition>
    </drilldown>
____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma

rjthibod
Champion

You need to slightly adjust your syntax. I would suggest renaming the token to be slightly more logical, like the following.

 <drilldown>
   <condition match="'InUse' != &quot;true&quot;'>
     <set token="InUse">true</set>
   </condition>
   <condition match="'InUse' == &quot;true&quot;'>
     <unset token="InUse"/>
   </condition>
 </drilldown>

...
<panel depends="$InUse$">
0 Karma
Get Updates on the Splunk Community!

Enterprise Security Content Update (ESCU) | New Releases

In December, the Splunk Threat Research Team had 1 release of new security content via the Enterprise Security ...

Why am I not seeing the finding in Splunk Enterprise Security Analyst Queue?

(This is the first of a series of 2 blogs). Splunk Enterprise Security is a fantastic tool that offers robust ...

Index This | What are the 12 Days of Splunk-mas?

December 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...