Dashboards & Visualizations

How to create a hyperlink for column values?

aashish_122001
Explorer

I have a requirement that in a report where there are 2 columns M_Number & Count

where the result set is
M_Number Count
1 1000
2 1019
3 1290

Now I want to put hyperlink on values 1, 2 & 3 to put the report hyperlink which will open the detail report for that M_number

niketn
Legend

Refer to "Dynamic Drilldown" example on Splunk 6.x Dashboard Examples app. There are various examples, however the one you are interested in is "Table panel with dynamic drilldown that passes the clicked row's 'count' column value to populate a form"

        <drilldown>
            <link>/app/<YourAppName>/<YourDetailDashboardName>?form.M_Number=$row.M_Number$</link>
        </drilldown>

You even have an option to do a contextual dynamic drill-down within the same dashboard. Refer to "In-Page Drilldown with Perma-linking" example as well, if you don't want users to be redirected to a separate page.

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

pasokkum
Path Finder

Try adding css to that column in your stylesheet and use drilldown functionality..

 .table#element1 td:nth-child(0)
 {
       text-decoration: underline;
       color: blue;
 } 

martin_mueller
SplunkTrust
SplunkTrust

You can specify a link to your detail report in a drilldown tag:

...
<table>
  ...
  <drilldown>
    <link>your_detail_reports_view?M_Number=$row.M_Number$</link>
  </drilldown>
</table>
...

See http://docs.splunk.com/Documentation/Splunk/6.1.3/Viz/PanelreferenceforSimplifiedXML#link for reference.

hwakonwalk
Path Finder

Thank you Martin!
Sure, I'll open new questions for any new queries

0 Karma

hwakonwalk
Path Finder

I have a similar problem, I have to pass two values in the same link, my data goes like

M_Number M_Category Count
1 A 1000
2 B 1019
3 C 1290

If I click on A, B or C, I have to pass both M_Number and M_category to the search query of the target dashboard,What if we have to send two parameters in the same link?
My table goes like:

M_Number M_Name Count
1 A 1000
2 B 1019
3 C 1290

If click on A, B or C the link should pass both A and 1 to the search query for other dashboard pannel

0 Karma

martin_mueller
SplunkTrust
SplunkTrust

Adapt the names to fit your case:

<link>your_detail_reports_view?M_Number=$row.M_Number$&amp;M_Name=$row.M_Name$</link>

Additionally, do open new questions when you have new questions in the future.

hwakonwalk
Path Finder

Thank you Martin!
I am very new to programming, tried using variables but I am not sure about the syntax for two variables
Would appreciate if you provide me the syntax for using two variables
I know it looks very awkward but I have never used any xml or programmed anything 😞

0 Karma

martin_mueller
SplunkTrust
SplunkTrust

Use $row.M_Number$ and $row.M_Name$ in your link.

0 Karma
Get Updates on the Splunk Community!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...