🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

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

Sort by:
1 - 1 of 11
    User: "Mikael Konradsson"
    Altair Employee
    Updated by Mikael Konradsson

    Hi,

    Sorry for the late reply!

    Have a look at the function PanopticonApi.getCurrentWorkbook(). This function will return the current state of the workbook. 

    image

    With Regards

    Mikael