Creating a new virtual parameter is quite easy. There are three parts to creating a virtual parameter. We will go over them one by one.
1. Virtual Parameter Scripts
You can write a new script or use an existing script. Please see guide on writing virtual parameter script to write a new script.
To use an existing script, simply click on "Use existing script" and choose the script that fits your need. Please see guide on using an existing script for more details.
2. Virtual Parameter Properties
There are four required properties and they are explained below,
- VP Name - Identifier for your virtual parameter
- VP Description - Description for your virtual parameter
- Script Name - Identifier for your script. Once saved, you can reuse the script for a different virtual parameter by selecting "Use existing script"
- Group - As an owner of the script, you can edit the script at later point in time. This Group property extends the edit permission to users in the group.
3. Input Parameter
Input parameter allows you to expose existing parameter in OnPing as an input to your script.
When you add a parameter, a variable name is assigned to the parameter as inputX where X is the index number. As an example, given the screenshot above, the variable name is input1.
You can also use function called input to expose existing parameter in Onping. Please refer to adding parameter as input source documentation on how to use them.