Managing script parameters

The Velocity Console allows you to organize parameters associated with a script. Once added, these parameters and their options are editable from the Scripts screen based on their scope of use. In other words, by adding parameters with this tool, you create a static placeholder for values that you can later add and change based on session, screen, and field scope on the Scripts screen.

Watch a related video (3:13)

Variable Name

The name of the parameter. This value cannot contain spaces or any other special characters.

Display Name

The name of the parameter that users will see on the Scripts pane.

Description

A short overview of the parameter's intended behavior, along with any other relevant information. This field has no character limit.

Default Value

The default value entered for the parameter. This value must be entered in the format specified by the Validation Regex field or as an option. If this format is violated, an error message appears and the value will not be saved to the project. A value is not required and can be left blank for users to input on the Scripts screen.

Validation Regex

The required format of the string. If you've entered a Default Value, its format must match the one set here.

For example, a Validation Regex value of ^[0-9]+$ means the Default Value and any value set on the Scripts screen must include any number from 0 to 9, and it cannot contain letters or special characters. If this format is violated in either location, an error message or red border appears around the field and the value will not be saved.

You cannot enter a value in this field if options already exist for this parameter.

String

Adds or removes quotes from either side of the parameter to identify it as a string value.

Options

Lists all accepted values for the parameter. If you have specified a Default Value above, that must also be included as an option in this pane. You must provide the following details for each option:

Name. The name of the option as users will see it in the Console. For example, Parameter Value 1.

Value. The name or value for the option as it is referenced in the script. For example, parValue1.

The Validation Regex field must be blank to add options to a parameter.

To edit script parameters

1.From the Advanced Configuration screen, select the checkbox next to the script you want to alter and then click Edit.

2.Edit changes to the name, version, tags, scope, and description on the Details tab.

Click on the Script tab to make changes to the parameters, resources, or the script text.

3.When you have finished editing the script, click OK to save your changes.