Dashboards & Visualizations

link to another dashboard

ishaanshekhar
Communicator

Hi,

I have a simple table that has some values. All these have a corresponding dashboard with the same name.
I want to navigate to the dashboard for the value clicked.

Here is what I did and it did not work. (Any token value post the ? for passing values does work, but here my requirement is to replace the token for the value clicked before the ?)... Additionally, full link with IP address also works, but since it is a SHC, I don't want to hard code the URL.

<drilldown>
          <link>
            </app/search/$click.value$]]>
          </link>
</drilldown>

Please help!

Thanks,
Ishaan

rajnish1202
Explorer

Hi Dawson014,
I have similar problem to resolve. Did you get the solution for this?

I am getting the same error "Invalid view name requested: "$row.fieldname$". View names may only contain alphanumeric characters." when using drilldown.

Regards,
Rajnish Kumar

0 Karma

Dawson014
Path Finder

Hi Rajnish,

Yes, we did what swbodie suggested and resolved the issue, without using the drilldown feature. We used the script provided below by swbodie with some modifications as per our requirement.

0 Karma

rajnish1202
Explorer

Thanks for your response Dawson014. I will try the same.

0 Karma

swbodie
Path Finder

It looks like you attempted to use CDATA tags but didn't quite get the syntax right. Try this:

 <drilldown>
           <link>
             <![CDATA[/app/search/$click.value$]]>
           </link>
 </drilldown>

swbodie
Path Finder

I'm sorry I misinterpreted your requirement, I did not realize the click value was the name of the dashboard you were trying to link too.

You may be able to accomplish this through javascript with something like this. Not 100% sure on this though:

 require([
     'underscore',
     'jquery',
     'splunkjs/mvc',
     'splunkjs/mvc/tableview',
     'splunkjs/mvc/simplexml/ready!'
 ], function(_, $, mvc, TableView) {
     var CustomLinkRenderer = TableView.BaseCellRenderer.extend({
         canRender: function(cell) {
             return cell.field === 'column_name';
         },
         render: function($td, cell) {
             var link = cell.value;
             var a = $('<a>').attr("href", "/app/search/"+cell.value).attr("target", "_blank").text(cell.value);
             $td.addClass('table-link').empty().append(a);

             a.click(function(e) {
               e.preventDefault();
               window.open($(e.currentTarget).attr('href'));
             });
         }
     }); 

         // Get the table view by id
         mvc.Components.get('table_id').getVisualization(function(tableView){
         // Register custom cell renderer
         tableView.table.addCellRenderer(new CustomLinkRenderer());

         // Force the table to re-render
         tableView.table.render();
     });
 });
0 Karma

Dawson014
Path Finder

Great! Thanks, though we were trying to use javascript as a last resort. We'll try to implement it.

Dawson014
Path Finder

That's a typo, We used or [CDATA[/app/search/$click.value$]] or [CDATA[/app/search/$row.fieldname$]] only. but we we get a message saying:

Invalid view name requested: "$row.fieldname$". View names may only contain alphanumeric characters.

swbodie
Path Finder

You need to tell it which dashboard (or view name) to go to in this case. As an example if I had a dashboard called my_example_dash that took an input named examplein it would look something like this:

  <drilldown>
            <link>
              <![CDATA[/app/search/my_example_dash?form.examplein=$click.value$]]>
            </link>
  </drilldown>

This documentation page may help clarify a bit more:

http://docs.splunk.com/Documentation/Splunk/6.2.0/Viz/Dynamicdrilldownindashboardsandforms

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Observability Simplified: Combining User Experience, Application Performance & ...

Tech Talk Observability Simplified: Combining User Experience, Application Performance & Network ...

Event Series May & June: From Network Visibility to Service Intelligence

Unifying the Network: Moving from Alert Noise to Service Intelligence with Splunk ITSI In today’s hybrid ...

Global Splunk User Group Events: May + June 2026

Your Splunk Community Awaits: Discover Upcoming User Group Events Worldwide    Staying ahead in the fast-paced ...