Guides

Variable Collections

Variable Collections

A Variables Collection provides a way to store information such as numbers, or text.

var_col.png

By using OCP variables, you can make your job scripts more dynamic and adaptable, as they enable you to change the stored data or perform calculations based on the values stored in the variable.

When you export or import an Application, it is exported and imported along with its Variables collection.

During the import process, pay attention to the following aspects:

  • Non-Sensitive Variables: Keys for both non-sensitive and sensitive Variables can be imported. However, to maintain security and confidentiality, the values of sensitive Variables are not included.

  • Create-Only Approach: The import mechanism follows a "create-only" approach for Variables. This means:

    • Creation of Missing Variables: If there are Variables in the imported collection that do not exist in the current environment or group, they will be created.

    • No Updates to Existing Variables: The Variables and their values that already exist in the environment or a group will not be updated. However, there is an option to overwrite the values of non-sensitive Variables during the import process. If enabled, this option allows the values of non-sensitive Variables to be updated with the values from the imported collection.

Data Searching, Filtering, and Sorting

Data Searching

Use the Search field to shorten the list of collections to those associated with the text in the field.

The search engine will scan all elements related to a variable collection, such as the name of a variable collection, application, application tag and group.

search_field.png

Data Filtering

The search filters provide flexibility by allowing you to select multiple items from the list. When dealing with extensive lists, these filters include a convenient search field to streamline your selection process, enabling you to quickly locate specific items without the need for endless scrolling.

To open the search filters, click the Filter icon.

filtering.png

Data Sorting

To arrange the data alphabetically, click the Arrow icon. You can sort the data by criteria such as Name, Application, App Tag, and Group.

sorting.png

Rows height

You can adjust the height of the rows by clicking the Rows Height button.

rows_height.png

Keyboard Navigation

The Environments Manager supports full keyboard navigation to comply with the European Accessibility Act (EAA). You can perform all actions in the application using only your keyboard.

Key

Action

Tab

Move focus to the next focusable element

Shift + Tab

Move focus to the previous focusable element

Enter

Activate the focused element (e.g., button, link)

Escape

Close modal dialogs, menus, or popovers

Spacebar

Activate a button or toggle a checkbox

Arrow keys

Navigate between menu items, dropdown options, or radio buttons

Form Controls

Key

Action

Enter

Submit a form when focused inside an input field

Spacebar

Toggle a checkbox or activate a button

Arrow keys (↑ ↓ ← →)

Navigate between options in a radio group or open dropdown

Home / End

Jump to the first or last item in a list or menu

Tables

Key

Action

Arrow keys (↑ ↓ ← →)

Move between cells

Ctrl + Home / Ctrl + End

Jump to the first or last cell in the table

Modals and Dialogs

Key

Action

Escape

Close the dialog

Tab / Shift + Tab

Move between focusable elements within the modal

When a modal is open, focus is contained within it. Keyboard focus will not move to elements outside the modal until it is closed.

Create a Variables Collection

To manually create a Variables Collection for an application, proceed as follows:

  1. Navigate to Environment ManagerVariable Collections.

  2. Click the + Variable Collection button.

var_coll_button.png
  1. Select an application from the drop-down list and provide a name for the Variables Collection you wish to create for it.

2024-03-28_13-43-54.png

4. Click Create Collection button and the new collection will be added to the Variables Collection list.

You can create only one Variable Collection per Application.

Alway redeploy the Application in Orchestrator after a Variables Collection has been added.

When an application, which already has an associated Variable Collection, is published in Orchestrator with a new Application tag, a new Variable Collection is automatically created for the newly assigned application tag.

Create Variables

Once you have created a Variables Collection for a specific application, you can start creating variables within that collection, that can be used in your application and the related miniApps.

  1. Navigate to Environment ManagerVariable Collections and click on the collection you wish to add variables to.

  2. Click the + Variable button.

var_search.png
  1. In the opened dialog-box, fill in the fields as described below:

2024-12-04_15-28-24.png
  • Key name: Enter the name of the key.

  • Enable Masking: If marked, the variable will be treated as sensitive even if the application is not marked as sensitive. Sensitive variables will not be updated during the application import. Masked variables cannot be logged and the Logging option will not be available to be checked.

    sensitive_info.png
  • Description: An optional description for the created variable.

  • SND Value: Enter a Sandbox (SND) value for the variable.

  • Use the same for PRD value: If checked, the SND and PRD values will be identical. Otherwise, unmark the checkbox and fill in the PRD field.

  • PRD Value: Enter a Production (PRD) value if different from SND.

  • Skip values update on import: Specifies if the values are to be updated during the application import. If the Enable Masking checkbox is marked, the Skip values update on import checkbox is automatically greyed-out.

    • Checked: The value will not be updated during the application import.

    • Unchecked: The value will be updated during the application import. This only refers to non-sensitive data.

  • Logging: By default, the system logs variable values that are not masked. To stop this process and create a smaller and more manageable log file, deselect the respective checkbox. This can make the investigation process easier when needed.

  1. Click Save. A new Variable will be added to your Collection list.

You can add as many Variables to a collection as required.

If the Variables list is extensive, use the Search field to locate the needed Variable.

var_search_field.png

Update Variables

To update a Variable from the list, proceed as follows:

  1. Click the Options Menu icon on the right of each variable and select Edit Variable.

edit_var.png
  1. In the opened dialog-box, modify the necessary fields same way as in Create Variables section. All the fields are editable.

2024-12-04_15-41-20.png

Delete Variables

To delete a Variable from the list, proceed as follows:

  1. Click the Context Menu icon on the right of each variable and select Delete Variable.

delete_var.png
  1. In the opened dialog-box, click Delete to confirm.

delete_confirm.png

Use of Variables

Variables are JavaScript objects and can be used anywhere in OCP miniApps and Orchestrator as per below.

miniApps
  1. As a dynamic value in prompts → {{ocpvars:myKeyValue}}

    2024-04-16_17-41-53.png
  2. As a JS object in functions → if (ocpvars.myKeyValue == "Test") { ... }

    2024-04-16_17-38-56.png
Orchestrator

In Orchestrator variables can be used to create conditions in Condition blocks. Open the condition setting and enter the variable name in the Field as #V_{name}and the required value.

2024-04-04_10-48-32.png

Rename a Variable Collection

To rename a Variable Collection:

  1. Click the Options menu icon on the right and select Rename Collection.

rename_coll.png
  1. Edit the name of the collection in the Variable Collection window and click the Update button.

2024-06-04_16-21-46.png

Export a Variables Collection

You can export a Variables Collection independently of its application. This allows you to transfer variables between collections without moving the entire application.

To export a Variables Collection, proceed as follows:

  1. Navigate to Variable Collections.

  2. Click the Options menu next to the collection you want to export and select Export Collection.

export_collecton.png
  1. The collection will be downloaded automatically as a JSON file.

Exported collections can be imported into collections of other applications or saved for backup purposes.

Import a Variables Collection

Once you have exported a Variables Collection as a JSON file, you can import it into a collection of another application.

To import a Variables Collection, follow the steps below:

  1. Navigate to the Variable Collections section and locate the Variables Collection where you want to import the variables.

  2. Click the Options menu next to the target collection and select Import Collection.

target_collection.png
  1. In the dialog box that appears, drag and drop the JSON file you want to import, or click Browse to browse for the file.

import_json.png
  1. Click Import to start the import process.

  2. After a successful import, the variables from the JSON file are merged with the selected collection. The sensitive variables with masking enabled are imported as masked.

vars_imported.png

If you’re importing variables with the same names as existing ones, what happens depends on the Skip values update on import option:

  • If checked: The import will not change any existing values. The current values remain unchanged.

  • If unchecked: The values of any existing variables will be updated with the corresponding values from the imported JSON file.

Delete a Variable Collection

You cannot delete a Variable Collection that is being used in an existing application. To delete it, you must first delete the corresponding Application. A warning message will appear in this case.

image (7).png

You may delete a Variable Collection if it is not required and is not used anymore. To delete it:

  1. Click the Options menu of the Variable on the right and select Delete Collection.

    2025-04-08_09-34-39.png


  2. Confirm that you wish to delete the collection by clicking Delete on the confirmation window.

    2025-04-08_09-40-51.png