Loop structure examples
Loop, Exit Loop If, and End Loop script steps define a structure that enables script steps to be repeated. Script steps between a Loop and an End Loop are executed continuously, until an Exit Loop If condition or an Exit After Last condition is reached for a Go to Record/Request/Page or Go to Portal step.
Use the Exit Loop If script step to specify a calculation to be evaluated. When the calculation result is not zero, it evaluates to True and the loop ends. When the calculation result is zero, it evaluates to False and the loop continues.
Example 1 
Copies the contents of the Customers::Work Phone to Customer::Day Contact in all records.
Go to Record/Request/Page [First]
Loop
Set Field [Customers::Day Contact; Customers::Work Phone]
Go to Record/Request/Page [Next; Exit after last]
End Loop
Example 2 
Loops through records to export files that are in container fields. Exits the loop if a record has an empty Container field.
Set Variable [$PATH; Value: Get ( DocumentsPath ) & Products::Container]
Go to Record/Request/Page [First]
Loop
Exit Loop If [IsEmpty ( Products::Container )]
Export Field Contents [Products::Container; "$PATH"]
Go to Record/Request/Page [Next; Exit after last]
End Loop