Pentaho

 View Only

 Access to a Simple Parameter created by a Filter Component

  • Pentaho
  • Ctools
  • Pentaho
Marco Antonio Catalano's profile image
Marco Antonio Catalano posted 05-19-2021 11:19

Hi to everyone,

 

I'm new pentaho user, so I'm not very used to the customization of the BI.

My question is very simple and I'll explain a bit the situation.

I'm using Pentaho Server 9.1 and I've created in the CDE a parameter that is filled by a filter component that uses a query ("sql over sqlJndi" from the Datasources Panel) to get the data.

The query gets a table with 2 columns like ID, Value and everything until now works well.

Now I want to print in different text components the value of the parameter but when I use:

function f() { pres= this.dashboard.getParameterValue("PM_PRES"); return '<p style="color:#000000;"><b>Selected pres: </b>'+pres+'</p>';}

It prints the ID, but I'd like to print the value!

I don't know if this is the best way to solve my problem, so I'm open to different solution.

 

P.S. I've tried on the documentation, but no results... maybe I've looked in the wrong doc. Can you also suggest me a doc to use as reference for further problems?

 

Thank you for your time,

Marco


#Ctools
#Pentaho
Marvin Horst's profile image
Marvin Horst

Normally the value is used only to populate the html for the input display to help the user when they're making selections. The filter component assigns the ID or IDs to the parameter value.

 

The "Value as ID" controls whether the parameter is assigned the selection ID or value. Only one never both are assigned to the parameter when a selection is made.