In Javascript onload on addpage:
I have a variable
var ctrlbalsheetcheck= Runner.getControl(pageid, 'BalanceSheetChecks');
I have then created a function which includes the following:
ctrlbalsheetcheck.setValue(Number(ctrlCAtotal.getValue()) + Number(ctrlNCAtotal.getValue()));
I want to capture the value at ctrlbalsheetcheck each time it changes in accordance with the function and then incorporate it into an if else statement eg
if (ctrlbalsheetcheck == 0) {
pageObj.hideField("BSCheckExpl");
} else {
pageObj.showField("BSCheckExpl");
}
});
I have tried a variety of combinations of syntax for the if else statement and cannot get it to work.
I am wondering if I am missing something like a .on('change', or a getElementBy type statement somewhere.
I did not use the on.change statement as I understood this only works if the user changes the field value rather than in my case where the field value is created as a result of an equation.
Any assistance would be appreciated.