How do I get the initial value of a parameter in a javascript part
I can listen for parameter changes in the PostLink section of a javascript part using code like the snippet I've pasted below.
But I want to find the initial value of a parameter as well (ie the value on entry to the dashboard, before it is ever changed).
Is there a function I can call to retrieve this value?
config.handleParamChanged = function h(event) {
var v = event.parameters.filter(function (param) {
return param.name === 'maxrows';
})[0];
if (!v) { return; };
config.maxrows = v.value
};
PanopticonApi.addParameterListener(config.handleParamChanged);
function destroy() {
PanopticonApi.removeParameterListener(config.handleParamChanged);
}
return destroy;
Answers
-
Hi,
Sorry for the late reply!
Have a look at the function PanopticonApi.getCurrentWorkbook(). This function will return the current state of the workbook.
With Regards
Mikael
0