Token Calculator
This activity uses standard arithmetic operations to create custom tokens. This activity uses existing tokens combined with arithmetic operations to create new tokens.
To set up this activity:
- Drag the activity from the toolbox pane and drop it in the Designer pane.
- In the properties pane, type a name and description of the activity.
- In the Calculated Tokens property box, click New token... to define the custom tokens created by the Token Calculator activity.
- Type a name for your token next to Token.
- Under Token, select a formula.
- Click the Add button to add the selected token formula.
- Add values or tokens using the token picker into the formula.
- Optional: Click Test Formula to make sure you set up the formula correctly.
Note: To test a function that allows for multi-value tokens, separate each value with a semicolon. For example, to use the expression SUM(%(token)), type 1;2;3 and click OK.
- In Token Tags, set the token type to evaluate the tokens in conditions correctly. If the type of the token value is a number, for example, you must select Number in Token Tags.
Note: To use mathematical expressions to create custom date and time tokens, use the Date Token Calculator activity.
Note: Typing in decimal numbers (e.g., 3.5) in the Sum and Average functions is not supported when your regional settings use a comma as the decimal separator.
- Click OK.
Note: You can use tokens created with this activity to create more tokens within the same activity. To reference a token created in this activity, the referenced token must be listed before the token that refers to it in the Calculated Tokens property box.
Tip: To easily create a complex mathematical expression, first create a series of simpler expressions. Then, reference the tokens of those simpler expressions in an additional calculated token.
You may want to disable activities if you only want to test specific sections of your workflow. To disable activities:
- Select an activity in the designer pane to highlight it.
- In the Description property box, clear Enable.