Create release variables

You can use variables to manage information that you don’t know in advance or that may change. Unlike global variables, release variables can only be used in the template or release in which they are created. You can create a release variable using the release flow editor or the Variables screen.

Create a release variable in the release flow editor

To create a release variable, type its name in a task in the release flow editor, using the ${ } syntax. Example: Typing ${name} creates a variable called name, which you can then edit on the Variables screen.

The variable’s type depends on the type of the field where you created the variable. Example: If you type ${name} in a text field, name will be of the type text and if you type ${name} in a password field, name will be of the type password.

Other properties, such as the variable’s label and description, will be left blank. You can edit them on the Variables screen.

Note: If you enter a password in the ${variable} format, XL Release will treat it as a variable, so you cannot use this format for the text of the password itself.

Create a release variable on the Variables screen

You can also create release variables using the Variables screen:

  1. In a release or template, select Variables from the Show menu.

  2. Click New variable. The Create Variable screen displays.

  3. In the Variable name box, type a name for the variable.

  4. In the Label box, optionally type a label for the variable. This will display next to the fields in which users can enter a value for the variable.

  5. Select the variable type from the Type list:

    • Text: A string of letters or numbers
    • List box: A drop-down list of selectable values that can be reordered and can contain duplicates
    • Password: A password
    • Checkbox: A true or false Boolean value
    • Number: An integer
    • List: A list of values that can be reordered and can contain duplicates
    • Set: A set of values that cannot be reordered and cannot contain duplicates
    • Date: A date format
    • Key-value map: A set of keys and corresponding values

    Note: To prevent the display of passwords, password variables can only be used in password fields. Any other type of variable cannot be used in password fields.

  6. Next to Default value, optionally type a value for the variable. To add a value to a list or a set, type the value in the box and press ENTER.

  7. In the Description box, optionally type a description of the variable. This will display below the fields where users can enter a value for the variable.

  8. If the variable must have a value, select Required.

  9. To allow users to enter or change the variable’s value when starting a release, select Show on Create Release form.

  10. Click Create to create the variable.

How required variables work

If a variable is required and you selected Show on Create Release form, the variable must have a value before the release can start. This can be the default value that you set for the variable in the template or a value that the user enters when starting the release.

Similarly for tasks, if a variable is required and it is used in a task, then it must have a value before the task can start. This can be the default value that you set for the variable in the template or release, or a value that the user enters before the task becomes active. If a required variable is missing a value when the task becomes active, the task is not started and remains in the needs input state until a user enters a value.

Edit a release variable

To edit a variable in a template or a running release, select Variables from the Show menu, then click the desired variable.

Note: You cannot change the variable’s type.

If you change the variable’s value, planned tasks that use that variable will reflect the new value. Completed, skipped, or failed tasks will reflect the old value, except in the case of user input tasks, which always show the variable’s current value.

Delete or replace a release variable

To delete or replace a variable in a template or a running release, select Variables from the Show menu, then click Delete/Replace next to the desired variable.

If the variable is not being used in the template or release, confirm that you want to delete it.

If the variable is still in use, you can choose how it will replace the variable wherever it appears in the template or release. You can replace the variable with:

  • A static value
  • A different variable (in ${ } format)
  • A blank space

After XL Release replaces all occurrences of the variable, it deletes the variable.

How to use variable(s) inside a variable

In XL Release version 8.5 and later, you can use variables inside another variable.

For more examples, see Variables in XL Release