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!

Splunk Life | Happy Pride Month!

Happy Pride Month, Splunk Community! &#x1f308; In the United States, as well as many countries around the ...

SplunkTrust | Where Are They Now - Michael Uschmann

The Background Five years ago, Splunk published several videos showcasing members of the SplunkTrust to share ...

Admin Your Splunk Cloud, Your Way

Join us to maximize different techniques to best tune Splunk Cloud. In this Tech Enablement, you will get ...