Add Action

image\Action_Variable_Add.jpg

The Add action allows you to add a specified number or the number contained in a different variable to the contents of a variable.

Note:
The other basic math actions available are: Subtract, Multiply and Divide. For more complex mathematical functions use the OpusScript language.

Setting up the Add action:

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

2. Use the Number option in the Add panel to add a number to the value of the variable entered in the Variable box of the To panel (see point 3 below). Use the spin buttons to set a specific number. By default this option is selected.

Note:
By default, the number 1 is in this box. This action is normally used to increment a variable by one, for example, every time a user answers a question you might want to add one to a variable showing the number of tries they have at each question.

3. Use the Variable option in the Add panel to select the name of a variable in the current publication whose value you want to add to the variable entered in the Variable box of the To panel (see point 3 below). 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 New Variable… button to open the New Variable dialog box in which you can create a new variable.

Note:
The value of the variable you select here should only contain a number.

4. Use the Variable option in the To panel to select the name of the variable to which the number will be added. 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 New Variable… button to open the New Variable dialog box in which you can create a new variable.

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

Related Topics:

Introducing the Variables Actions

Choosing an Action