Creating and Saving Context Variables | Memory slot
Purpose and general information
@Memory
is a
@Slot
that allows you to write data to
@User Context Variables
, as well as create new
@User Context Variables
by writing a value to a previously non-existent variable.
Changing
@System Context Variables
in the
@Memory
@Slot
is prohibited, except for the
@client_message
.
Slot creation and settings
Slot attributes
Name ー the name of the
@Slot
, which will be displayed in the
@Script Tree
. The maximum length of a field value is 40 characters.
FIELDS ー an array of Key - Value pairs.
Important:
1. There must be at least one Key - Value pair
2. The maximum number of Key - Value pairs is not limited
Key ー variable name specified in accordance with the naming requirements for
@User Context Variables
. If you specify a variable incorrectly, a Script Validation error will occur.
Value ー value that will be written to the variable:
exact value (number, string, boolean)
result of the operation
value of another variable
Trimming spaces: by clicking the CREATE button (when creating a
@Slot
) or SAVE (when editing a
@Slot
), spaces and line breaks at the beginning and end of the Value field are trimmed.
Important: when specifying KEY, pay attention to the case dependence of the variable name (var and Var are different variables). Also, pay attention to the
Important: If you try to write to VALUE an operation that does not comply with the rules described in this article, an error will occur.
@System Context Variables
error will take the value Failed to process the data!
In order to write a value to a
@Context Variable
using the
@Memory
@Slot
, you must specify the name of the variable in the KEY field, and the desired value in the VALUE field.
Important: All variables are written only as Boolean, text, numeric or “Date” types. A number written in single quotes ('45') is a string and cannot be used in arithmetic operations.