Overview
The Evaluate Block performs a mathematical operation on the input values and outputs the result. It supports a variety of operations including addition, subtraction, multiplication, division, exponentiation, modulus, absolute value, and negation.- Inputs
- Outputs
- Editor Settings
Inputs
| Title | Data Type | Description | Default Value | Notes |
|---|---|---|---|---|
| A | number | The first operand for the operation. | (Required) | The input will be coerced into a number if it is not a number. |
| B | number | The second operand for the operation. | (Required for binary operators) | The input will be coerced into a number if it is not a number. |
Example 1: Performing a simple addition
- Create an Evaluate Block and set the
Operationto+. - Create two Number blocks, set their values to
2and3respectively. - Connect the Number blocks to the
AandBinputs of the Evaluate Block. - Run the flow. The output of the Evaluate Block should be
5.
Error Handling
If the operation fails (for example, if you try to divide by zero), the Evaluate block will error.FAQ
Q: What if I want to perform a different operation based on the input? A: You can use theOperation input port to dynamically change the operation based on the input. The input will be coerced into a string and must match one of the supported operations.

