REPORTER 22.1

Creating a Variable from Javascript

Creating a Variable from JavaScript

You can create variables from JavaScript scripts in REPORTER with the Variable constructor. For example

JavaScript
var fred = new Variable(reporter.currentTemplate, "DEFAULT_DIR", "current model directory", "/data/test1");

By default any variable that is made will be marked as temporary but this can be changed. For more details see the Variable class in the JavaScript reference manual.