Global Tenant Constants
Overview
If you have a specific variable value that you want to use for different variables in multiple inventories, use the Global Constants functionality. You can access the functionality from the Resources tab.
Unlike local constants (see chapter Working with Constants for local constant details), global constants can be used in multiple inventories. To use global constants in your variables, first create a global constant in the Global Constants screen. Then in your inventory, simply add a reference to it for your variable.
If you update a constant later on, the change applies to all variables that reference it. You no longer need to manually update each variable in any of your inventories.
Permissions
To create, edit and delete global constants, the user must have MODIFY_TENANT permission. For an overview of the permissions, see the Permissions table in chapter Managing Users and Groups via REST.
The Global Constants screen
The Global Constants screen shows the created global constants. You can create, edit or delete global constants from the screen.
The screen consists of the following elements:
Element name | Comments |
---|---|
Search filter | |
Name | By clicking the copy icon, the reference ID can be copied and inserted manually into a variable in any inventory. See further details in the [Using global constants] chapter. The column can be sorted by clicking on the column header. |
Value | The column can be sorted by clicking on the column header. |
Used in | Lists the inventories from which the global constant is being referenced to. If the given constant is not referenced yet in any inventories, it is displayed as "Unused". |
Description | Shows the description defined during the creation of the global constant. |
Action | Edit icon: Allows you to edit the content and description of the global constant.Delete icon: Deletes the global constant. Note that a deletion is irreversible and cannot be undone. |
Create global constant button | Click on this button to create a global constant. See further details in the following chapter. |
Create global constants
To use global constants in your variables, first create them on the Global Constants screen.
Perform the following steps to create a global constant:
- Open the Global Constants screen.
- Click the Create global constant button to open the Create new global constant dialog.
- Define a constant name, constant value and optionally a description.
- Click the Createbutton.
The global constant is created and displayed as "Unused" in the Global constants table.
The following movie shows the process of creating a global constant.
Edit global constants
You can edit the global constant value and description on the Global Constants screen. The update affects all variables that reference the constant in any inventory.
Perform the following steps to edit a global constant:
- Open the Global Constants screen.
- Click the Edit global constant icon button in the Action column.
- The Edit existing global constant dialog opens.
- Edit the constant value and optionally the description.
- Click the Save button.
The content and description of the global constant is updated.
The following movie shows the process of editing a global constant:
Delete global constants
You can delete global constants, but note, that the action is irreversible.
Perform the following steps to permanently delete a global constant:
- Open the Global Constants screen.
- Click the Delete icon in the Action column.
- The Warning dialog opens.
- Confirm the warning by clicking the Delete button.
The global constant is permanently deleted.
Even if the global constant is removed from the Global Constants screen, its reference ID remains in the referring variable in the inventory. It has to be removed manually.
The following movie shows the process of deleting a global constant:
Use global constants
To use global constants in your variables, you need to insert their references in your inventory. You can do this in the following ways:
- Copy-paste the reference ID into the inventory. Click the copy icon next to constant name in the Global Constants screen, and paste it into your inventory.
- Use the Insert global constant button in your inventory editor.
- Type the the reference ID into the inventory.
For more details, see the [Working with Constants] chapter.