Articles on: Blocks Creator
This article is also available in:

🟦 Expression

🟦 Expression



The Expression block allows you to perform mathematical calculations or logical evaluations based on a custom formula. It acts as an advanced calculator or validator for complex conditions (e.g. life > 100 and mana < 50), automatically generating the necessary inputs for the variables used in the expression.


This block is particularly useful for centralizing operations that would otherwise require multiple blocks of calculation or logic, while dynamically adapting to the required variables.


πŸ“₯ Entries


  • expression (Text): Mathematical or logical formula to evaluate (eg: price * quantity or age >= 18). Variables not defined in the project automatically create dynamic input connectors.
  • Dynamic variables (Number/Text/Boolean): Entries automatically generated for each variable detected in the expression (eg: price, quantity, age).


πŸ“€ Outings


  • result (Number/Text/Boolean): Value resulting from the evaluation of the expression. The type automatically adapts to the result (Boolean for conditions, Number for calculations, Text for concatenations).


πŸ’‘ Example of use


Scenario: Calculating the total price of an order with discount


  1. A user fills out a form with the quantity of items (3) and the unit price (29.99).
  2. The stream passes these values ​​to an Expression block.
  3. In the Expression block, the author enters the formula: price * quantity * 0.9 (applying a 10% reduction).
  4. The block automatically generates two dynamic inputs: price (Number) and quantity (Number).
  5. The form values ​​are connected to the corresponding inputs.
  6. The result output (80.9725) is transmitted to a Text block to display the message: "Total after reduction: €80.97".


βš™οΈ Technical Details

  • Dynamic input generation: The block analyzes the expression in real time and creates the necessary connectors for each unknown variable. The entry types are deduced from the context (e.g. age >= 18 generates an age entry of type Number).
  • Automatic output typing: The type of result is determined by the evaluation of the expression (ex: 5 > 3 β†’ Boolean, "Hello" + "World" β†’ Text).
  • Supported syntax: Mathematical operators (+, -, *, /, %), logical (&&, ||, !), and comparisons (>, <, ==, !=). Advanced functions depend on the execution environment.

Updated on: 04/03/2026

Was this article helpful?

Share your feedback

Cancel

Thank you!