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 (2)
0 Karma
Get Updates on the Splunk Community!

Dashboards: Hiding charts while search is being executed and other uses for tokens

There are a couple of features of SimpleXML / Classic dashboards that can be used to enhance the user ...

Splunk Observability Cloud's AI Assistant in Action Series: Explaining Metrics and ...

This is the fourth post in the Splunk Observability Cloud’s AI Assistant in Action series that digs into how ...

Brains, Bytes, and Boston: Learn from the Best at .conf25

When you think of Boston, you might picture colonial charm, world-class universities, or even the crack of a ...