Round Action

image\Action_Variable_Round.jpg

The Round action allows you to round a number stored in a variable to a whole number rather than include decimal places. The number will be rounded down if the decimal fraction is below half otherwise it will be rounded up. For example, performing the Round action on 6.4 will result in 6; rounding 6.5 or 6.8 will result in 7.

Note:
Note that the rounded number replaces the content of the variable so if you want to keep the original value you need to copy it into another variable using the Set Variable action.

Tip:

You can use this option to round a number to a set number of decimal places by combining the Multiply and Divide actions with the Round action. Thus to reduce something to two decimal places multiply the number by 100, perform the round action and then divide by 100 to get your original number to two decimal places.

Setting up the Round action:

  1. Add the Round action to your trigger, as described in adding actions. The Round tab will automatically appear when you add the action.

  2. Use the Variable option of the Destination panel to select the variable from the current publication that contains the number to be rounded. Click on the down arrow to the right of the Variable box to list all of the variables in the current publication. Alternative, click on the Create New Variable… button to open the New Variable dialog box in which you can create a new variable.

  3. Click on the Apply button to save your changes.

Related Topics:

Introducing the Variables Actions

Choosing an Action