The Expression Solver worker is used to solve expressions on numbers and lists using values received from upstream workers. Once you set an expression in the Expression field (Ex: a + b), you must give this expression's variables a source, by setting the variable value.
The Expression Solver worker must receive specific parameters in order to execute properly.
Set the expression(e.g.: sum(x) * 2) using String variant. Current available methods to use in the expression:
log(x): Calculate the natural logarithm of x, element-wise. This is a scalar if x is a scalar.
exp(x): Calculate the exponential of all elements in the input list.
- sum(x): Calculate the sum of all elements in the input list.
All basic arithmetic operations are available in the Expression Solver worker.
Set the value using Upstream Data variant. You can add more values and variables clicking in the Add Line button.
3. Variable Name
Set the variable name using String variant.
Once this worker finishes to execute successfully, it will return an object containing the expression's result to the workflow, which can be used by downstream workers. Below you can see an example of the Expression Solver's result object hierarchy.
For instance, if your expression looks like a*2, with a being a list, then the output will be a list. If your expression looks like sum(a) * b, with a being a list and b being a number, then the output will be a number.
You can check the Output Types article to learn more about result objects types.
- Results (list of lists)