Exit Loop If

Exits a loop if the specified calculation is true (not zero).

Options 

Specifies the Boolean calculation you want evaluated.

Compatibility 

Product Supported
FileMaker Pro Yes
FileMaker Go Yes
FileMaker WebDirect Yes
FileMaker Server Yes
FileMaker Cloud Yes
FileMaker Data API Yes
Custom Web Publishing Yes

Originated in version 

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 is 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.

Copy
Set Variable [$PATH; Value: Get ( DocumentsPath ) & Products::Container]
Go to Record/Request/Page [First]
Loop [ Flush: Always ]
    Exit Loop If [IsEmpty ( Products::Container )]
    Export Field Contents [Products::Container; "$PATH" ; Create folders: Off]
    Go to Record/Request/Page [Next; Exit after last: On]
End Loop