Reference > Script steps reference > Control script steps > Exit Loop If
 
Exit Loop If
Purpose 
Exits a loop if the specified calculation is true (not zero).
See also 
Format 
Exit Loop If [<Boolean calculation>]
Options 
<Boolean calculation> specifies the calculation you want evaluated.
Compatibility 
 
Where the script step runs 
Supported 
FileMaker Pro 
Yes 
FileMaker Server 
Yes 
FileMaker Go 
Yes 
Custom Web Publishing 
Yes 
FileMaker WebDirect 
Yes 
Runtime solution 
Yes 
Originated in 
FileMaker Pro 6.0 or earlier
Description 
If the calculation is true (not zero), the script continues with the script step that follows the End Loop script step.
If the calculation if false (zero), the loop is not exited and the script continues with the script step that follows the Exit Loop If script step.
Example 1 
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: On]
End Loop
Related topics 
Defining calculation fields
If function
If structure examples
Loop structure examples
Script steps reference (alphabetical list)
Script steps reference (category list)
About formulas