Dashboards & Visualizations

How to send the "&" and the "=" character from a token in a link drilldown

SplunkTrust
SplunkTrust

Hello Splunkers,

I have a token that gets values such as:
&A=153&B=223&C=555

I am sending this as part of the url in a drilldown to link to another page. When I get to the other page the "&" is replaced by its url encoded value (%26) same for the "="...

Any idea how I can make it pass through as an & to indicate another token value for the next page ?

EDIT: the CDATA for the link looks something like this:

  <![CDATA[/app/<APP_NAME>/<DASHBOARD>?earliest=$earliest$&latest=$latest$$token$]]>

Where the $token$ is &A=153&B=223&C=555

Regards,
David

1 Solution

Champion

If you are trying to pass those token values in a URL, you likely need to wrap them with the CDATA call.

 <drilldown target="new">
         <link>
           <![CDATA[/app/<APP_NAME>/<DASHBOARD>?earliest=$earliest$&latest=$latest$&A=153&B=223&C=555]]>
         </link>
 </drilldown>

Reference answer: https://answers.splunk.com/answers/124226/passing-selected-time-range-to-drilldown-in-simple-xml.htm...

View solution in original post

Legend

Hi DavidHourani,
Did you tried to put your token, in the secondary dashboard, between brackets (")?
Bye.
Giuseppe

0 Karma

Splunk Employee
Splunk Employee

If you are running v6.5+, there is a new token filter to "not encode" the token in whatever form it is in.

Just use: $token|n$

Try something like this then:

 <drilldown target="new">
          <link>
            <![CDATA[/app/<APP_NAME>/<DASHBOARD>?earliest=$earliest$&latest=$latest$$token|n$]]>
          </link>
  </drilldown>

Path Finder

Thanks!! its working for me:)

0 Karma

Champion

If you are trying to pass those token values in a URL, you likely need to wrap them with the CDATA call.

 <drilldown target="new">
         <link>
           <![CDATA[/app/<APP_NAME>/<DASHBOARD>?earliest=$earliest$&latest=$latest$&A=153&B=223&C=555]]>
         </link>
 </drilldown>

Reference answer: https://answers.splunk.com/answers/124226/passing-selected-time-range-to-drilldown-in-simple-xml.htm...

View solution in original post

SplunkTrust
SplunkTrust

Ah i thought I wrote that i did ^^ will add that... My CDATA looks something like this :

 <![CDATA[/app/<APP_NAME>/<DASHBOARD>?earliest=$earliest$&latest=$latest$$token$]]>

Where the $token$ is &A=153&B=223&C=555

Champion

Ah, I see. Let me ponder a bit more.

Champion

What about using $token|u$ in the URL?

<![CDATA[/app/<APP_NAME>/<DASHBOARD>?earliest=$earliest$&latest=$latest$$token|u$]]>

Reference: https://answers.splunk.com/answers/150424/documentation-of-token-filter-like-s-simple-xml.html

0 Karma

SplunkTrust
SplunkTrust

will try this tomorrow morning and give u a big like if it works lol

0 Karma

Champion

No problem. I misunderstand your votes from earlier to suggest that it worked.

Hopefully it does.

0 Karma

Champion

@DavidHourani: Any luck with the suggestion?

0 Karma

Champion

@DavidHourani any updates on this issue and what solution worked for you? If one of them did, please accept the answer that was successful.

0 Karma

SplunkTrust
SplunkTrust

thank you !

0 Karma

Champion

Please click the "accept answer" link as well. That let's people know it worked for you.

Thanks.

0 Karma

SplunkTrust
SplunkTrust

of course, ill accept the right answer ^^ still didnt get it ! 😄

0 Karma