Example Script Variables
An example of how to use a script variable is outlined below:
- Navigate to ScriptRunner → Script Variables.
- Click Create Script Variables from either the previously created list or the initial landing screen. The Create Script Variable screen appears:
- Enter a name in the Script Variable Name field.
- Enter a password in the Script Variable Value field.
- Click Save. Once saved, you will see a confirmation message display and you are automatically redirected to the Script Variables page. You can click the eye icon next to the Password to make it visible, or not visible, as required.
- Access saved script variables from the Script Context in the editors for the Script Console, Script Listeners, Workflow Post Functions, Scheduled Jobs, and Escalation Service, as shown in the example below:
You can then reference the script variable saved in step 5: