By the end, your configurator has a named intermediate result that several rules can read.
Délka 3600. Use your own names.A variable is a named rule: it works out a value once and every rule reads it by name. When the calculation changes, you fix it in one place. A constant is a variable whose rule is a fixed value, such as a wall thickness of 40. Both live in one list.
Open the Variables and constants step.
It sits between Define inputs and Rules. You see a list with the columns Name and Value.
Click New variable.
The button is on the ribbon. While there are no variables, the row Add a new variable does the same. The new variable is selected at once, and the Properties panel shows its Name and Rule.
Fill in Name.
Type Vnitřní délka and press Enter.
Write the Rule.
In the editor, type [Délka] - 2 * 40. It writes itself as soon as you stop typing. The Value column shows 3520, the result at the inputs' default values.
Read the variable in a rule.
In the Rules step, insert it from the Variables menu or type its name: [Vnitřní délka] / 2 gives 1760. A form field rule reads it the same way.
Create a constant (optional).
Add another variable named Tloušťka stěny with the rule 40. You can then write the formula as [Délka] - 2 * [Tloušťka stěny] and change the thickness in one place.
Extract a variable straight from a rule (optional).
In a rule's editor, select part of the formula and press Ctrl+E, or right-click and choose Extract variable. Type the Variable name and click Create variable. The selection becomes a reference.
Save the configurator.
Click the save icon in the window header or press Ctrl+S.
The Value column shows 3520 for Vnitřní délka. In the Define inputs step, change the default of Délka to 4000: the variable's value is 3920. Then put 3600 back.
The name cannot be saved.
A variable cannot share a name with an input or a Library table, because rules read them all by the same name. It cannot be called TRUE, FALSE, AND or OR, and cannot contain square brackets or quotes.
The value is #CIRCULAR!.
The variable reads itself through another variable. The app lists the cycle. Break it.
The value shows no default value and an input's name.
The rule is fine, but the input has no default, so it cannot be calculated. Add one in the Define inputs step.
The value is a red error, yet the variable stayed saved.
A variable is saved even with a calculation error, so that you can fix it. Only a typo in the syntax or an unknown name is not saved. A rule that reads such a variable gets the same error.
A new variable has no value.
A variable without a rule shows nothing. Write its Rule.
The step holds only a sentence about Code mode.
The configurator calculates with a script and does not use variables. They stay saved and come back when you switch to Formulas, see Code mode.
Read values from a table in a rule
A variable can read a Library table too.
Use the variable in a parameter's rule.
Use functions and conditions in a rule
Conditions and rounding inside a variable.
A variable on a form field's properties.