Dashboards & Visualizations

How do I unset a token if a click value is has the same value?

andrewtrobec
Motivator

Hello All,
I have a pie chart divided into slices. When I click a slice it sets a token tok_slice_value with click.value which causes some other fun stuff to happen on the dashboard. If I click on another slice then the token gets updated with that new click.value. What I would like to do is unset the token if the token value is the same as the new click.value. I think I've got it, but I just cannot get the right syntax. Here's what I have:

<drilldown>
   <condition match="&quot;$tok_slice_value$&quot; == &quot;$click.value$&quot;">
      <unset token="tok_slice_value"></unset>
   </condition>
   <condition>
      <set token="tok_slice_value">$click.value$</set>
   </condition>
</drilldown>

Doesn't work unfortunately and I've tried a number of different options to no avail. Can someone please help me?

Thanks!

Andrew

0 Karma
1 Solution

renjith_nair
Legend

@andrewtrobec ,

Try

<condition match="$tok_value$ == 'click.value'">
---
What goes around comes around. If it helps, hit it with Karma 🙂

View solution in original post

renjith_nair
Legend

@andrewtrobec ,

Try

<condition match="$tok_value$ == 'click.value'">
---
What goes around comes around. If it helps, hit it with Karma 🙂

andrewtrobec
Motivator

@renjith.nair It works! So I should use '' instead of $$ for the click value. Thanks!

0 Karma
Get Updates on the Splunk Community!

Exporting Splunk Apps

Join us on Monday, October 21 at 11 am PT | 2 pm ET!With the app export functionality, app developers and ...

Cisco Use Cases, ITSI Best Practices, and More New Articles from Splunk Lantern

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Build Your First SPL2 App!

Watch the recording now!.Do you want to SPL™, too? SPL2, Splunk's next-generation data search and preparation ...