Dashboards & Visualizations

Looking for a way to append a token value to the end of a URL

ArmbrusterC
Explorer

I have a dashboard with a field called %field1%
I would like to generate a simple hyperlink the user can click on to open a new tab to our ticketing system.
I need to append the value of the token to the end of a static URL. Then display that value as an active link somewhere in the dashboard for the user to click and open the ticketing system.

For example:
If I enter FooBar in the field

The link would be:
hxxps://ticketing.system.com/textsearch.do?sysparm_search=FooBar

Thanks in advance for any help. I will continue reading and update the question myself if I find a working solution. This seems too simple not to be possible.

0 Karma
1 Solution

sundareshr
Legend

That depends on what type of field it is. Can you share your dashboard code. In most cases. a token value can be reference by $tokenname$. So in your example, it could be as simple as

<link>hxxps://ticketing.system.com/textsearch.do?sysparm_search=$tokenname$</link>

There a wealth of information here: http://docs.splunk.com/Documentation/Splunk/6.4.1/Viz/tokens

View solution in original post

sundareshr
Legend

That depends on what type of field it is. Can you share your dashboard code. In most cases. a token value can be reference by $tokenname$. So in your example, it could be as simple as

<link>hxxps://ticketing.system.com/textsearch.do?sysparm_search=$tokenname$</link>

There a wealth of information here: http://docs.splunk.com/Documentation/Splunk/6.4.1/Viz/tokens

ArmbrusterC
Explorer

This put me on the right track. The field is a text input for a hostname.
I have posted the correct answer below.

<row>
    <html> <a href="https://ticketing.system.com/textsearch.do?sysparm_search=$field1$">Search for Tickets</a> </html>
</row>
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...