Warning!
You’re now reading a legacy document. Currently, Betty Blocks offers faster and more advanced options that are available in the next-gen. To find out how variables work in next-gen applications, proceed to this article.
Variables act as placeholders for temporary values used in the calculation of a certain value (functions and/or formulas). For example, in the formula a2 + b2 = c2
, a
and b
are variables representing values that are used for calculating variable c
(also a value).
The values used in the variables a
and b
depends on the purpose. For example, whether:
A set value is expected
A value is being calculated
Information from a previous step is included in the calculation.
Different types of variables used when building applications
When implementing variables in your application, it's important to keep the use case in mind. The variable is either selected based on a set value or needs to be generated or determined (calculated). The following explains the different variable types:
Variable | Input variable |
Variables that already contain a set value or automatically calculate a value based on an expression. They are defined in:
| Variables that require input by a user, page/endpoint or previous action. Can be assigned a value when using the parent action as sub-action or when an action is initiated manually from the back office. They are defined in:
|
Using variables
The following provides an example of where you can apply variables:
Pages menu example: | Data model example: |
Note: When applied as a text variable, for example,
|
|
➝ Next article: Global variables and how they are created