Increment Variable Action

Description

Increments a variable by the specified amount.  The variable must contain a valid number.  If the variable is blank, zero is assumed. Used to increase the value of a "counter" variable. Normally counters are used inside of a loop.

Declaration

<AMINCREMENTVARIABLE RESULTVARIABLE="text [variable name]" AMOUNT="number">

Example

<AMVARIABLE NAME="thecounter">0</AMVARIABLE>
<AMLOOP TOTALLOOPS="100">
<AMINCREMENTVARIABLE RESULTVARIABLE="thecounter">
</AMLOOP>

General Tab Parameters

Variable to increment: Specifies the name of the variable to increment.

Text [variable name], Required
MARKUP: RESULTVARIABLE="thecurrentdate"

Increment by: Specifies the value that the variable should be incremented (increased) by.

Number, Optional - Default is 1
MARKUP: AMOUNT="5"

Notes

All variables must be created before they can be used. This is done using the Create Variable <AMVARIABLE> action. Once created, variables can be set using the Set Variable <AMSET> action, or by certain actions that support populating variables. To get data out of the variables, in any action parameter, simply surround the variable name with percentage % signs (e.g. %varname%). Remember not to use percentage signs when specifying the name of a variable to populate, percentage signs are only needed to get data out.

See Also

Decrement Variable, Create Variable, Set Variable