Number
In Monkedo, the Number data type is essential for any automation. Numbers in Monkedo can be whole or fractional, and they can be positive or negative.
Number and Math Components
Section titled Number and Math ComponentsMonkedo offers a variety of components to handle mathematical operations, all available under Action > Math category. These components allow you to perform calculations like addition, subtraction, multiplication, and division, as well as more complex functions such as finding the average, maximum, or minimum values in a set of numbers. Check the category for all available components.
The components typically accept one or two numbers as input, but there are also options for working with lists of numbers, enabling you to perform calculations like summing or averaging across a list of numbers at once.
Math Expressions
Section titled Math ExpressionsFor many basic mathematical operations, you donβt even need a separate component. Instead, you can use Math Expressions directly within component inputs. The result of the calculation will be used as the component's input. To access this feature, hover over an input field and look for the "+Expression" button.
Once you click this, you can select the Math expression type and enter your calculation.
In Math Expressions, you can mix constant values with dynamic inputs. For example, you can create expressions such as:
[input] + 1
[cost] * [quantity] + 10
When you click the Expression Box, an option menu will appear, showing all available values you can use. The example values in brackets above represent the values selected from option menu. This flexibility allows you to easily reference input values or previously named values in your calculations.
Converting to Numbers
Section titled Converting to NumbersIn some cases, numbers provided by external apps (especially spreadsheets) might be in Text format instead of Number format. You can see the data type of any value in the editor by checking its type next to the input.
If you encounter this situation, youβll need to convert the text data into a numerical format. Monkedo provides several components to handle this, such as:
Text to Number: Converts text that represent numbers into actual Number data.
Convert Column to Number: Converts entire columns of text-based numbers into numerical format.
Similarly, it is possible to format Numbers into Text in a format you choose. These conversion components ensure that your automations work smoothly, even when the source data is not in the expected format.
By understanding how to work with numbers in Monkedo, you can easily perform calculations, manage large sets of numerical data, and ensure that everything runs smoothly in your automations.