Aitum Action: Change Global Variable Value

The Change Global Variable action allows you to change the state (value) of a Global Variable.

This may be one of the most powerful actions in Aitum. Familiarizing yourself with the usage of Global Variables can greatly expand the automation capabilities of Aitum!

After choosing a variable in the State Variable field, the Current Value of the variable will be shown. The Modifier field (dropdown menu) will then show the modifiers that can be used with the specified variable type. See a full list of each variable type, and their modifiers in the Variable Modifiers section below.


Action Inputs

State Variable

The Global Variable to be changed.

Type Text (Dropdown)
Required Yes
Allows Variables No
Allows Template Text No

Aitum cannot currently interpret the result of these requests.

Variable Modifiers

Text (String)


Use the Set modifier to overwrite/replace the text of the variable entirely.

Example: Set ‘Test Text’ to ‘Set New Variable Text’ Result = ‘Set New Variable Text’

Example: Set ‘Test Text’ to ‘Set New Variable Text’ Result = ‘Set New Variable Text’


Use the Append modifier to add characters after the current value of the text variable.

Example: Append ‘ Has Been Appended’ to ‘Test Text’ Result = ‘Test Text Has Been Appended’

Example: Append ‘ Has Been Appended’ to ‘Test Text’ Result = ‘Test Text Has Been Appended’

You’ll need to start with a ‘space’ before your text in the value box if you would like a space between the previous value and the appended characters.


Use the Find & Replace modifier to replace only a specified set of characters. The ‘Value’ field will be the text you’d like to replace, while the ‘Replace Text’ field will be what it’s replaced with.

Example: Replace ‘Text’ with ‘Replacement’ Result = ‘Test Replacement’

Example: Replace ‘Text’ with ‘Replacement’ Result = ‘Test Replacement’


Use the Reverse modifier to reverse the text of the variable.

Example: Reverse ‘Test Text’ Result = ‘txeT tseT’

Example: Reverse ‘Test Text’ Result = ‘txeT tseT’


Use the Prepend modifier to add text before the current value of the text variable.

Example: Prepend ‘Even More ’ to ‘Test Text’ Result = ‘Even More Test Text’

Example: Prepend ‘Even More ’ to ‘Test Text’ Result = ‘Even More Test Text’

Whole Number (Integer)


Use the Set modifier to overwrite/replace the current value of the variable entirely.

Example: Set 36 to 37 Result = 37

Example: Set 36 to 37 Result = 37


Use the Add modifier to add the specified amount in the value field to the variable.

Example: 37 + 5 Result = 42

Example: 37 + 5 Result = 42


Use the Subtract modifier to subtract the specified amount in the value field from the variable.

Example: 42 - 5 Result = 37

Example: 42 - 5 Result = 37


Use the Multiply modifier to multiply the value of the variable by the number specified in the value field.

Example: 37 x 3 Result = 111

Example: 37 x 3 Result = 111


Use the Divide modifier to divide the current variable value by the value specified.

Example: 10 / 2 Result = 5

Example: 10 / 2 Result = 5

Since the whole number can’t be a float.(number that contains a decimal point) If the value after being divided would result in a float, the result will be rounded.


Round and set

Decimal (Float)


Use the Set modifier to overwrite/replace the text of the variable entirely.

Example: Set 36 to 37 Result = 37

Example: Set 36 to 37 Result = 37


Use the Add modifier to add the specified amount in the value field to the variable.

Example: 37 + 5 Result = 42

Example: 37 + 5 Result = 42


Use the Subtract modifier to subtract the specified amount in the value field from the variable.

Example: 42 - 5 Result = 37

Example: 42 - 5 Result = 37


Use the Multiply modifier to multiply the value of the variable by the number specified in the value field.

Example: 37 x 3 Result = 111

Example: 37 x 3 Result = 111


Use the Divide modifier to divide the current variable value by the value specified.

Example: 10 / 2 Result = 5

Example: 10 / 2 Result = 5


Use the Round and Set modifier to round the variable to the nearest whole number value.

Switch (Boolean)


Use the Set modifier to set the Switch variable to True or False.


Use the Flip modifier to toggle the Switch variable between True and False. i.e. If the variable is currently True, it will ‘Flip’ to False.

String List (String)


Use the Set modifier to set the value of the entire string list.

String List (String)  
Modifier Type Description
Set  
Add  
Remove  
Clear  

Copyright © 2024 Aitum