Velocity powered by Wavelink

> Managing Projects > Creating Scripts > Adding or Editing a Script

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

Adding or Editing a Script

With the Velocity Console, you can create new scripts or edit existing ones from the same interface. For information on the scripts currently available to you, see the Ivanti's Velocity Scripting API Call documents.

The two ways you can create scripts includes:

Manually. Using this method, you build the script code from scratch using the Velocity Console. When building a script manually, you build the JavaScript code for the script line-by-line. The Console allows you to name scripts, add parameters, and access specific features of your mobile device.

Library. Using this method, you can leverage pre-built scripts to perform a variety of tasks. These scripts were developed by Ivanti's technicians and field engineers to address specific and real-world needs. You can solely rely on the pre-generated script or make your own modifications to tailor it for your organization.

For testing scripts, we recommend that you keep an Android device connected to the computer you're running the Velocity Console on for easy deployment and script execution.

Function Name

The name of the function. This value cannot contain spaces or other special characters, and it must be unique from other functions.

Display Name

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

Version

The version number of the script. This can be formatted with or without decimals, such as 1 or 1.0.

Compatibility

The type of host profile the script is designed for. This feature is not fully implemented.

Tags

Associates tags with the script that can then be used to filter scripts similar in purpose or application. Each tag should be separated by a comma. Tags entered here are displayed as filtering options from the Scripts screen.

Description

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

Parameters

A list of all associated parameters. These can be edited and added to scripts as needed. You can hard-code parameters into the script itself without having to enter parameters. However, we recommend using this functionality as it allows for cleaner scripting and the ability to change parameters based on their session, screen, or field scope. For more information, see Managing Script Parameters. If you change an existing parameter or add new parameters, these values can be reset from the Scripts screen once you've saved the script.

From this pane, you can Add, Edit, and Delete parameters associated with the script.

Script

The body of the script, containing all functions and parameters needed to execute the script. The parameters and variables listed here must be added to the Parameters pane. You must identify the parameters and options by name within the script body, but you aren't required to set absolute values for each of these, as it can be done from the Parameters pane on the Scripts screen based on session, screen, or field scope.

If your script references any external files, you must add it as a resource file so that it is bundled with your project when deployed. For more information, see Configuring Project Settings.

ClosedTo add a script

1.From the Scripts screen, click New.

2.Enter a Function Name, Display Name, and Description. The Function Name cannot contain characters like spaces or symbols.

3.Enter the script using JavaScript. Provide any script-specific parameters by clicking Add below the Parameters pane.

4.When completed, click OK. The script must now be linked to a scope. For more information, see Setting Scopes.

ClosedTo add a script from the script library

1.From the Scripts screen, click Library.

2.Select the scripts you want to add. You can hold the Shift key and select multiple scripts at once if needed. Click OK once done.

3.The scripts are added to the project and display in the Scripts pane. The script must now be linked to a scope. For more information, see Setting Scopes.

ClosedTo edit a script

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

2.Make the changes as needed and then click OK.

3.If any new parameters are introduced or existing parameters changed, you may need to re-set their values on the Scripts screen.

 

 


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