I have a variable value ctrlbalsheetcheck which is created as a result of the formulae:
var ctrlbalsheetcheck= Runner.getControl(pageid, 'BalanceSheetChecks');
ctrlbalsheetcheck.setValue(Number(ctrlCAtotal.getValue()) + Number(ctrlNCAtotal.getValue())- Number(ctrlCLtotal.getValue())- Number(ctrlNCLtotal.getValue())- Number(ctrlEQtotal.getValue()));
This formulae is working as expected.
However each time the ctrlbalsheetcheck value is changed I need the variable BSCheckDesc (see below) to automatically change.
The ctrlbalsheetcheck field is never changed by user input directly to this field but only by user input changing one of the component variables of the above formulae ie ctrlCAtotal,ctrlNCAtotal,ctrlCLtotal etc..
I have entered the below code and the automatic change is not occurring. I think perhaps it may be because the
ctrlbalsheetcheck field is not being changed by user input directly on it, but rather it is a result of component fields as described above.
This is the current coding for it but it does not work as BSCheckDesc does not automatically change when ctrlbalsheetcheck changes:
ctrlbalsheetcheck.on('change', function(e) {
var BSCheckDesc = "Balance sheet is out of balance by $" + ctrlbalsheetcheck.getValue();
var ctrlBSCheckDesc = Runner.getControl(pageid, 'BSCheckDesc');
ctrlBSCheckDesc.setValue(BSCheckDesc);
});
Please assist if possible.