Using formula block
This article will guide you through the process of using the Formula block.
In order to use the Formula block, you need to add it to your workflow. It is as simple as selecting the Action Block and finding the Formula block in the list of available blocks:
Once the block has been added in, you can use any of the supported formulas.. In order to get the values from the item, to use in your formulas, we advise using the Get item data block before the formula block. That way, you can include the data values in your formulas:
Finally, the formula returns 3 values back:
- Formula output (String) - Returns a string value if applicable (such as "3" for a number or "true" for a boolean value) or an empty string if the value can't be converted to string
- Formula result (Number) - Returns a number value if applicable, or null if the value can't be converted to a number
- Formula result (Boolean) - Returns a boolean value (true/false) if applicable, or null if the value can't be converted to a boolean
Keep in mind that often times, multiple (or all) of these values will be returned. For example, if we take a look at formula ADD(2, 3), the following will be returned:
- Formula output (String) - "5"
- Formula result (Number) - 5
- Formula result (Boolean) - false
You can then use these results in the next steps of your formula recepie: