How do I get the initial value of a parameter in a javascript part

User: "Tony Halse_22248"
Altair Community Member
Updated by Tony Halse_22248

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;

Find more posts tagged with