Creating Parameters
Script Parameters are accessed from the Parameters tab of the Scripting Center. Parameters can be used by form, scheduled, and library scripts. Parameters are automatically available when form and / or scheduled scripts are enabled, see Scripting Switches.
Parameters have account wide scope, changing the value for a parameter will affect all scripts using that parameter.
References to parameters can be set from the Scripting Center Manage parameters or from the Scripting Studio Script Parameters section.
To create a parameter:
-
Sign in as an Administrator and go to the Parameters tab on the Scripting Center.
Note:Make sure you have the necessary switches enabled, see Scripting Switches.
-
Create a new parameter from the Create Button.
Create a parameter in the same way as you would create a custom field.
-
You can manage all the parameters from the Parameters tab in the Scripting Center.
-
Click on the Name of a parameter to edit its definition.
Note:You cannot delete a parameter or change the name of a parameter that is Referenced by a script.
-
Click on Set to change the value selected for the parameter.
Important:A parameter can be referenced by more than one script. Changing the value affects all scripts referencing the parameter. Form, scheduled, and library scripts can reference parameters.
-
Click on the Referenced by script to open the script in the Scripting Studio.
-
To use a parameter:
-
First create any parameters you need, see To create a parameter:.
-
Reference the parameter either from the Scripting Center Manage parameters or from the Scripting Studio Script Parameters.
-
You can use the NSOA.context.getParameter(name) or NSOA.context.getAllParameters() functions to read the parameter values in your script.
-
Administrators can change the script values from the calling script in the Scripting Center.
Click on the parameter name to change the value.
Important:A parameter can be referenced by more than one script. Changing the value affects all scripts referencing the parameter. Form, scheduled, and library scripts can reference parameters.