Hi Marco,
I have solved it using a trick.
First, i use a button to confirm the entered parameters.
In the "expression" property of the button, i perform a switch/case statement so that, based on the selected parameters, a different data source is dynamically selected. I assign the name of the data source to a parameter (in my case, I decided to name the parameter "genericSQL" and the variable dataS contains the name of the datasource selected in the switch/case), which is updated using a firechange, like this: dashboard.fireChange("genericSql", dataS)
I only needed to display the data in a table, so i set empty the name datasource in the datasource property and in the pre-execution property, i specify the selected data source like this:
function f() {
# some other code here
this.chartDefinition.dataSource = this.dashboard.getParameterValue('genericSql');
}
------------------------------
Carl Messner
Administrative Assistant
MCSF
------------------------------
Original Message:
Sent: 07-04-2023 07:43
From: Marco Voto
Subject: Pentaho CDE
Hi all, I'm new to Pentaho, is it possible in PreExecution to set dinamycally dataSource?
Please help me. Thanks in advance.
------------------------------
Marco Voto
Systems Engineer
GPI
------------------------------