|
|
Loop Action |
|
Declaration |
<AMLOOP TOTALLOOPS="number"
FROM="number" TO="number" INDEX="text" STEP="number"> |
|
See Also |
End Loop, Loop Files, Loop Windows, Loop Processes, Loop Expression, Loop Dataset, Loop List, Break |
Loops through a range of numbers. The variable specified in the Index parameter is updated with the current loop count. With each successive loop a block of steps is executed and the loop counter is incremented by the number specified in the Step parameter. The loop ends after the counter has reached the number specified in the stop parameter or when a Break is encountered.
To loop a block of steps through a range of numbers or loop a certain number of times.
Specifies the number of loops to be performed. Specifying TOTALLOOPS=5 is the same as specifying FROM=1 and TO=5
Specifies the number to start counting from when determining the number of times to loop. This value will be reflected in the index value returned as well.
Specifies the number to count up to when determining the number of times to loop.
The number by which the index is incremented by when looping through the FROM= and TO= parameters. For example, if FROM=1 and TO=10 and STEP=2 then the action would loop 5 times, if STEP=1 then it would loop 10 times.
Species the name of a variable to populate with the current counter value. This number starts at FROM= and is incremented by STEP= each loop, until TO= is reached.
Standard Error Handling Options
This action also includes the standard "Error Causes" and "On
Error" failure handling options/tabs
More on Error Handling Options
Variables and Expressions
All text fields allow the use of expressions by surrounding the expression
in percentage signs (example: %MYVARIABLE%, %Left('Text',2)%). To help
construct these expressions, a popup expression builder is available in
all these fields by pressing F2.
More on variables...
More on expressions...
More on the expression builder...
<AMVARIABLE NAME="indexvar"></AMVARIABLE>
<AMLOOP TOTALLOOPS="6" RESULTVARIABLE="indexvar">
<AMMESSAGEBOX>%indexvar%</AMMESSAGEBOX>
</AMLOOP>