Dashboards & Visualizations

Easy way to hide annotations based on token?

aohls
Contributor

I had annotations I wanted to control with a Yes or No dropdown. It mostly works, unsetting the token doesn't seem to clear the token correctly as the annotations remain. 

 

 

<search depends=$showToken$ id="base">
<query>search.....</query>
</search>
...
<input type="dropdown" token="showToken" searchWhenChanged="true">
<label>...</label>
<choice value="yes">Yes</choice>
<choice value="no">No</choice>
<change>
<condition match="$value$ == &quot;yes&quot;">
<set token="showToken">true</set>
</condition>
<condition match="$value$ == &quot;no&quot;">
<unset token="showToken"></unset>
</condition>
</change>

 

is there a better way to accomplish this easily? I saw an older post that said using javascript could work but I need to do this through only XML at this time.

Labels (3)
0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

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

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...