Script Parameter Template

Each script must define a parameter template.  The parameter template is a nested associative array which defines the parameters the user will be requested to select when the script is run.

ParameterTemplate:
           {
     ExampleInputA: {seq: 1, name: "Series Input", type: "series"},
     ExampleInputB: {seq: 2, name: "Numeric Input", type:"number", initial: 5, min: 3, max: 10},
     ExampleInputC: {seq: 3, name: "Boolean Input", type: "bool", initial : "false"},
     ExampleInputD: {seq: 4, name: "Enumeration Input", type: {"enum" :[ "Option 1", "Option 2", "Option 3"]}, initial: "Option 2"},
   },

Each entry in the parameter template defines an input the user must select, the order in which the parameters are to be displayed, and, for some parameter types, the inital value and allowable ranges for the parameter.  The following parameter types are allowed:

Series

A series input allows a script to take additional series as inputs, besides the primary input series.  The user selects a series input through an interactive dialog box.  It is declared as below.

ExampleInputA: {seq: 1, name: "Series Input", type: "series"},

The "seq" determines the order that this parameter is displayed to the user.  Parameters are displayed to the user in increasing order of their sequence.  The "name" specifies the user-friendly name for the parameter, which can contain spaces, dashes, or other special characters not allowed in JavaScript variable names.  The "type" for a series input is "series".

Number

A number input is an integer or floating point value which is selected by the user, by entering it into a text field.  It is declared as below.

ExampleInputB: {seq: 2, name: "Numeric Input", type:"number", initial: 5, min: 3, max: 10},

The "seq" determines the order that this parameter is displayed to the user.  Parameters are displayed to the user in increasing order of their sequence.  The "name" specifies the user-friendly name for the parameter, which can contain spaces, dashes, or other special characters not allowed in JavaScript variable names.  The "type" for a number input is "number".  "initial" declares the default value of this parameter.  "min" and "max" are optional, and define the allowable range of this parameter.  For more complex parameter validation, use the Validate function.

Boolean

A boolean input is an true or false value which is selected by the user via a check box.  It is declared as below.

ExampleInputC: {seq: 3, name: "Boolean Input", type: "bool", initial : "false"},

The "seq" determines the order that this parameter is displayed to the user.  Parameters are displayed to the user in increasing order of their sequence.  The "name" specifies the user-friendly name for the parameter, which can contain spaces, dashes, or other special characters not allowed in JavaScript variable names.  The "type" for a boolean input is "bool".  "initial" declares the default value of this parameter, which can be "true" or "false".

Enumeration

An enumeration input is a selection made by the user from a list of options through  a drop-down menu.  It is declared as below.

ExampleInputD: {seq: 4, name: "Enumeration Input", type: {"enum" :[ "Option 1", "Option 2", "Option 3"]}, initial: "Option 2"},

The "seq" determines the order that this parameter is displayed to the user.  Parameters are displayed to the user in increasing order of their sequence.  The "name" specifies the user-friendly name for the parameter, which can contain spaces, dashes, or other special characters not allowed in JavaScript variable names.  The "type" for an enumeration input is "enum", and an array of possible options (specified as strings).  "initial" declares the default value of this parameter, which can be any of the options declared.