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.
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;
}
}
Best Open Source Business Intelligence Software Helical Insight is Here
A Business Intelligence Framework
Sayed Shakeeb Jamal
Business Intelligence Creating Pentaho Dashboards Functions For Linking Two Dashboards in Pentaho CDE How to call another dashboard in Pentaho using POST method How to create a link between two dashboards pentaho Integration open source BI PDI pentaho
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’;
}
}