Global Variables

Learn about global variables in Aitum, and how to use them.

Global variables are an advanced feature of the Aitum app which allow you to save data for future use in rules. They can be used as part of rule checks, action execution modes, and even as fields in actions themselves.


Adding a global variable

You can add a new global variable by clicking on the Global Variables tab on the Aitum app, and then press New Global Variable. You will be asked to select a type for your variable, and then set a value for it. You can learn more about the different types of global variables below.


Changing a global variable

You can change the value of a global variable at any point on the Global Variables page of the app. However, the cool stuff happens when you change it programatically using your rules. You can use the Aitum action “Change Global Variable Value” to change the value of the global variable when a rule executes.

For example, the action below will change my global variable that has the Switch type to True when the rule executes.

aitum_globalvar_change.png


Types of global variables

There are several different types you can choose when creating a global variable:

  • Text - A normal string/sentence/line. For example, “Hi! This is my new global variable!”
  • Whole Number - A number/integer, without decimal points.
  • Decimal - A number with decimals.
  • Switch - Also known as a boolean. Either true or false.
  • String List - A list of strings (text).

String List

A global variable that is a String List is managed slightly differently to other variables. Once you create the variable, you can click the Manage List button on the Global Variables page for the variable you created, which then lets you manage what is inside of the string list.

On the window that opens, you can add new strings (text) to the list, remove existing strings, or clear the list entirely.

aitum_globalvar_stringlist.png


Copyright © 2024 Aitum