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:

  1. 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.

  2. Create a new parameter from the Create Button.

    Adding a new script parameter using the Create menu.

    Create a parameter in the same way as you would create a custom field.

  3. You can manage all the parameters from the Parameters tab in the Scripting Center.

    Script parameterlist view in OpenAir Scripting Center.
    1. 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.

    2. 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.

    3. Click on the Referenced by script to open the script in the Scripting Studio.

To use a parameter:

  1. First create any parameters you need, see To create a parameter:.

  2. Reference the parameter either from the Scripting Center Manage parameters or from the Scripting Studio Script Parameters.

  3. You can use the NSOA.context.getParameter(name) or NSOA.context.getAllParameters() functions to read the parameter values in your script.

    Example of script using script parameters.
  4. Administrators can change the script values from the calling script in the Scripting Center.

    Form Script deployments list view showing the Parameters Column.

    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.