Splunk Dev

drilldown token not working

sarit_s
Communicator

Hello

I have a dashboard with 2 panels, in the second one i have a drilldown with link to search

i'm trying to configure token but it is not working

this is what i tried to do:

  <init>
    <set token="TransactionId">$TransactionId$</set>
  </init>

and this is what im getting once clicking on the link:

TransactionId=$TransactionId$ 

what am i missing ?

thanks

Labels (1)
Tags (1)
0 Karma

ppudota1
New Member

Try using this if you have a column named TransactionId and trying to store it in a token when clicked

 

 <init>
    <set token="TransactionId">$row.TransactionId$</set>
  </init>

  

0 Karma

sarit_s
Communicator

 

this is the result

TransactionId=$row.TransactionId$ 
0 Karma

IZ88
Path Finder

Hi sarit_s,

What initiates the var $TransactionId$? Is it an input from the user? a search result from one of the searches in the dashboard?

0 Karma

sarit_s
Communicator

Hello

the value is taken from the search before. it is a drilldown

0 Karma

IZ88
Path Finder

If the value is passed down from another search you shouldn't use <init><set>

by doing so you remove any value that TransactionId token might have held when the search was called.

 

Just to make sure that I understand the flow:

A base search->clicking the result->opening a new search that should use the result from the previous search

 

is it correct?

 

0 Karma

sarit_s
Communicator

Hey

yes, it’s correct 

i also tried with click.value2

0 Karma

IZ88
Path Finder

If the drill down open a brand new search the simplest way would be to set the drilldown from the editor as 'link to search" and then once you click the value it will be added as a search parameter in the new search.

If the drilldown is connected to the second panel in your dashboard, you should set the token as "click.value2" and make sure that the other panel is dependent on the value of the token.

0 Karma

sarit_s
Communicator

the drilldown is depends on the second panel and i tried to use click.value2 but it is not working 

maybe im using it wrong 

i put this :

<set token="TransactionId">$click.value2$</set>

under the drilldown object and i get this error once trying to edit the drilldown through the ui:

 

sarit_s_0-1635164387707.png

 

0 Karma

IZ88
Path Finder

Try to delete the lines you've added in the XML.

You can use the editor to add the token

IZ88_0-1635168029905.png

The location of the code in the XML is important, if the <set> command isn't associated with the right panel, the token won't be able to populate. 

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 ...