Example Script Variables

An example of how to use a script variable is outlined below:

  1. Navigate to ScriptRunner → Script Variables
  2. Click Create Script Variables from either the previously created list or the initial landing screen. The Create Script Variable screen appears:
  3. Enter a name in the Script Variable Name field.
  4. Enter a password in the Script Variable Value field.
  5. 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.
  6. Access saved script variables from the Script Context in the editors for the Script ConsoleScript ListenersWorkflow Post FunctionsScheduled Jobs, and Escalation Service, as shown in the example below:

    You can then reference the script variable saved in step 5: