Variables are placeholders for changeable values and can be used to store text strings, Boolean, Lists, Maps (key/value pairs) and numbers.
Variables and Listeners are closely connected; a Variables with an empty value must be declared so that a Listener can access it in its operation. This way, when the condition of a Listener is fulfilled (usually when a certain user input is found), the operation of the Listener will be able to assign a certain value to the variable.
A Variable needs to have a unique name and follow the naming conventions detailed here.
Create a Global Variable
To create a Global Variable, go to the backstage of Teneo Studio (Solution tab, then Globals > Variables)
- Click the Add button in the top area of the window; the new Global Variable will open in the right-side of the window
- Enter the Variable's Name and the (default) Value
- Optionally, add a Description tot he Global Variable
- Click Save to preserve the changes.
For Localization setups, it is possible to select, under Branching, to include the newly created Global Variable in Local Solutions.
Edit a Global Variable
To edit a Global Variable, simply select the Variable from the list and click Edit in the top of the view. When finished, remember to click Save to preserve the changes, or alternatively Cancel to discard the changes and exit the edit-mode.
The History of a Global Variable is available by first selecting the Global Variable in the list and next clicking the Clock icon available next to the Edit button.
Read more about Version history here.
It is possible to restore a former version of a Global Variable. To do so, in the History window, select the version to restore to and click Restore in the top right side of the window.
The button Set Stable, available above a selected Global Variable, allows to set the current version of the Global Variable as stable when pressed.
To set a previous version of a Global Variable as stable, first open the History; in the History view, select the version and click Set Stable in the right top area.
To unset a stable version, select the Global Variable (version) and click Unset Stable.
Learn more about Version Flags.
Delete a Global Variable
To delete a Global Variable, simply select the Variable from the list and click Delete in the top of the view.
It is possible to multi-select Variables by pressing Ctrl while selecting to delete more than one Variable at the same time.
Global Variables are marked as delete pending until the user either:
- Save each Global Variable individually, by clicking Apply in the right side panel of each of the Global Variables
- Save all Global elements by clicking Save in the left-side panel of Studio, or
- Save the entire solution by clicking Save All in the left-side panel of Studio.
Include and Exclude
The Include and Exclude buttons refers to including or excluding the selected Global Variable in a Localization setup.
To either include or exclude a Global Variable from Localization setup, simply select the Global Variable and click the relevant button.
Read more about Localization setup here.