Functions For Linking Two Dashboards in Pentaho CDE

Posted on by By Nikhilesh, in Business Intelligence, Open Source Business Intelligence, Pentaho | 1

Use of Setparam() and GetParam() function for Linking Two Dashboards in Pentaho CDE

In order to link two dashboards using Pentaho CDE, we can define two set of functions one which could set the parameters and the other where one could fetch the parameters coming from the first Dashboard using the GetQueryParameter function.

Make data easy with Helical Insight.
Helical Insight is the world’s best open source business intelligence tool.

Get your 30 Days Trail Version

Before you set the javascript in the click-action property for the first Dashboard you should set the Chart as clickable.

The logic goes as follows:

function setparam(objscene)

{

var vars= objscene.vars;

var cat=vars.category.value;

var val=vars.value.value;

var url=’URL of Drilldown Dashboard’;

url= url + ‘?param_value=’ +cat;

alert(url);

window.open(url);

}

The param_value stores the category value on the fly and effectively the DrillDown Dashboard shows up the chart based on the Param Value.

Now for the 2nd dashboard we need to use a custom parameter component from the Generic tab in which we have defined a javascript function getParam() which will fetch the param_value parameter from the first dashboard thereby changes being made according to the value in the previous chart.

The function goes as follows:

function getParam()

{

if(Dashboards.getQueryParameter(‘param_value’)!==”)

{

return passing_param=Dashboards.getQueryParameter(‘param_value’);

}

else

{

return defaultvalue;

}

}

 

 

logo

Best Open Source Business Intelligence Software Helical Insight is Here

logo

A Business Intelligence Framework

Sayed Shakeeb Jamal

0 0 votes
Article Rating
Subscribe
Notify of
1 Comment
Oldest
Newest Most Voted
Inline Feedbacks
View all comments

getQueryParameter moved from dashboard to Utils

correct example for 8.0

function getParam()
{
if(Utils.getQueryParameter(‘par_supplier’)!==”)
{
return par_supplier=Utils.getQueryParameter(‘par_supplier’);
}
else
{
return par_supplier=’defaultValString’;
}
}