Learn how to set variables, what they're used for and what can be done.
In programming, a variable is an essential tool that allows us to store and manipulate data during the execution of a program. The Set Variable block is a crucial tool that allows us to create, establish a format, and set a value to a variable.
The Set Variable block is a useful tool that can help us store and manipulate data effectively. It allows us to name and store values such as numbers, texts, and dates in a box-like structure that we can access and manipulate later on.
Creating a Set Variable block is simple. We can choose to set or unset a value to a variable, and then create or choose an existing variable to store the value. We then select the format of the variable, which can be text, number, date, or array, and then set the value of the variable.
The Set Variable block also offers the option to perform calculations on the value. For example, we can add, subtract, multiply, divide, or calculate the remainder of two numbers. Dates can also be added or subtracted. This feature can be especially useful when working with complex data sets.The Set Variable block provides two outputs: success and failed. If the input is correct, the flow will follow the green path, but if the input is incorrect, the flow will follow the red path.
In summary, the Set Variable block is a useful tool for storing and manipulating data during program execution. It allows us to create, establish a format, and set a value to a variable. By providing the option to perform calculations on the value, it makes it easier to work with complex data sets.
00:23 What's a variable
00:43 Anatomy of the block