Velocity powered by Wavelink

> Managing Projects > Creating Scripts > Setting Scopes

This page refers to an older version of the product.
View the current version of the User Guide.

Setting Scopes

Through the use of scopes, scripts are linked to a session, screen, or field. After creating or using a library script, you must link it to a scope. Once linked, you may set variables from the Script Parameter pane.

Types of Scopes

You can set scopes by session, screen, or field. Each scope type must be entered in a specific format to ensure scripts are invoked at the right time.

Session: session

This scope must be entered as it is shown above. This scope executes any linked script when a session is started.

Screen: @ScreenName

Screen scopes are the Template name of a screen preceded by an @.

Field: @ScreenName:component-1

Field scopes consist of two parts: screen and element scopes, which are separated by a colon.

To link a script

1.From the Scripts screen, select the script you want to link.

2.Click the Link button below the Scope pane.

3.Enter the scope you wish to create. This can include session, screen, or field scopes, which are referenced above. After clicking OK, the script is linked to the scope.

To edit parameter variables

1.Select the script and scope you want to set parameters in. The parameters available for editing appear in the Parameters pane on the right.

2.Enter the parameter values as needed. Depending on the script, you can leave some fields blank. If a parameter contains a Managing Script Parameters, you cannot save the field's contents unless the value is entered correctly.

Values must be entered as they're required by the script. For an explanation on valid values for Ivanti's pre-generated scripts, see Using Library Scripts.

3.Click Save to keep your changes.

Scopes narrow the instances for when a script is invoked. This helps avoid potential overlaps with scripts that might interfere with one another. If you multiple scripts to the same scope, the parameters are applied based on the order of the scopes in the Scope pane.

For example, if you link the same script twice to a session where one parameter first prepends PRE- and the other prepends 123- to a bar code, the script with the PRE- value is applied first, followed by the script with the 123- value. The end result of a bar code scan would then be 123-PRE-XXXXXXXXX.


This page refers to an older version of the product.
View the current version of the User Guide.

The topic was:

Inaccurate

Incomplete

Not what I expected

Other