1
votes

I'm using pentaho CE v7.1, the CDE Dashboard Creator.

I'm capturing a selection on a chart. When I try to set the selected category on a param, I do in the click action javascript:

Dashboards.fireChange('param_ordername', atom2.label);

where:

  • param_ordername is the parameter
  • atom2.label contains the string I want to set to the parameter

In the JavaScript console I can see this error when clicking:

ReferenceError: Dashboards is not defined

I've tried this variant:

 this.dashboard.fireChange('param_ordername', atom2.label);

with the same results.

Any clue of how to set the value to the parameter?

Thanks,

Marta

4

4 Answers

4
votes

Does your dashboard have requirejs support?

If so, the Dashboards object doesn’t exist anymore.

You have two options:

  1. Disable requirejs support on the dashboard settings;
  2. Change all references to Dashboards object to this.dashboard (note the spelling differences).
1
votes

I don't know why this.dashboard.fireChange() doesn't work, but dashboard.fireChange() works for me with enabled requirejs support (Pentaho CE 7.1)

0
votes

With RequireJS, the usage would be:

this.dashboard.setParameter('param_name','param_value');
0
votes

you can use Dashboard.setParameter('parameterName','parameterValue') or Dashboard.setParametervalue('parameterName','parameterValue')