Dashboards & Visualizations

How to create a hyperlink for column values?

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

SplunkTrust
SplunkTrust

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!!!"
0 Karma

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;
 } 
0 Karma

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.

Path Finder

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

0 Karma

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

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.

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

SplunkTrust
SplunkTrust

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

0 Karma