The Calculator action allows mathematical calculations to be included in a workflow. This article discusses the Calculator action in more detail.
Table of Contents
Understanding the Calculator Action
The Calculator action allows mathematical calculations to be performed within a workflow. Inputs for these calculations are often stored in square brackets defined earlier in the workflow, allowing them for later use within the workflow. Results are stored in square brackets for further use as the workflow progresses.
Some Important Considerations
The Calculator action allows the following calculations to be performed:
- addition [ + ]
- subtraction [ - ]
- division [ / ]
- multiplication [ * ]
Just like mathematics in the real world, you can simplify more complex calculations using parentheses and common operators such as Average and Sum.
Aside from the symbols and functions corresponding to the basic mathematical operations mentioned earlier, the following can be used in Calculator actions:
- Numbers 0-9
- Decimal points
- SUM calculates the sum of all elements in a list. The syntax for SUM can be any of the following:
- SUM(number1, [number], ...)
- SUM(number1, number2, ...)
- SUM([number_list])
- AVERAGE returns the average (arithmetic mean) of the arguments. The syntax for AVERAGE can be any of the following:
- AVERAGE(number1, [number], ...)
- AVERAGE(number1, number2, ...)
- AVERAGE([number_list])
- As an example, if the range of numbers is 10-20, the formula = AVERAGE(10, 20) returns the average of these numbers, which is 15.
- Numeric [square_brackets] created or calculated earlier in the workflow.
To Set Up a Calculator Action
Use a Calculator action anytime you need to perform calculations within a workflow.
To set up a Calculator action:
- Drag a Calculator action to the canvas of the Workflow Editor.
- Position your cursor over the action, then click the Edit icon when it appears.
- On the Action Editor, enter the formula to be used in the calculation. For example, [volume_barrels] * [price_per_barrel].
- Enter a name for the result, which will also be used as a square bracket. For example, in the above screenshot, Trade_value_USD is the name of the result from the formula entered in Step 3.
- Click Advanced Options and enter the decimal places that will be used when displaying the result.
- Click the x button on the top-left to save your changes and close the Action Editor.
NOTE: The Calculator Action is one of several Actions in Autto that have a Run for Table option, which allows you to use it against every record in an existing table and enter the results into a new table. Using square brackets, you can then use the new table later on in the workflow. For more information, see Getting Started with Run for Table.
How a Calculator Action Appears in the User Application
The Calendar action does not appear in a Workflow. Workflow users may be asked to enter the inputs for the calculations but the workflow itself does not show these calculations being performed.This is why a Calculator action cannot be previewed.
Rather, the Calendar action does its work behind the scenes, performing calculations without showing on the User Application. The results are stored in the designated square bracket, which can be used later on as the workflow progresses.
Comments
0 comments
Article is closed for comments.