Description |
Loops through the rows of the dataset specified. With each successive loop a block of steps is executed and the current row of the dataset is incremented. The loop ends when at the end of the dataset or when a Break is encountered. |
Declaration |
<AMLOOPDATASET DATASET="text" FROM="number"
TO="number" SORT="text [options]" SORTEDCOLUMN="text
[columnname]"> |
Examples |
<!--- Demonstrates using SQL query with Loop Dataset.
Gets all customer where city field is San Diego. Then writes names to
a file, to make this Workflow work change the SQL Query connection string
and query to match your database--->
<!--- This example checks the pop3 mailbox and if a
message contains the subject 'Get out of Debt' then it is deleted. To
make this Workflow work - modify both POP3 steps with the proper server
and account information ---> |
General Tab Parameters |
Dataset name: Specifies the name of a previously created dataset. Example actions that create datasets are SQL Query, POP3 Mail, and Stored Procedure. Text, Required Optional parameters: Start row: Specifies the record (row) to start on when moving through the dataset. Number, Optional Default - 0 End row: Specifies the record (row) to stop on when moving through the dataset. If omitted or set to 0 the End Row is the last in the dataset. Number, Optional - Default 0 |
Advanced Tab Parameters |
Output list: Specifies whether a sort order should be applied to the values before the loop begins. If using Loop Dataset with a SQL Query, in most cases it will be more efficient to perform the sorting as part of the query instead of using this option. If ascending or descending specified, a valid column name to sort on must also be specified.
Text [options], Optional (default "none") Sort on column: Specifies the column to sort on if Output List [SORT=] is set to ascending or descending. Must specify a valid field/column name. Text, Required if SORT is ascending or descending |
See Also |
Loop, End Loop, Loop Files, Loop Windows, Loop Processes, Loop Expression, Loop List, Break |