Reference > Script steps reference > Control script steps > Exit Loop If
 

Exit Loop If

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

See also 

Options 

Specifies the Boolean calculation you want evaluated.

Compatibility 

 

Product 

Supported 

FileMaker Pro Advanced 

Yes 

FileMaker Go 

Yes 

FileMaker WebDirect 

Yes 

FileMaker Server 

Yes 

FileMaker Cloud 

Yes 

FileMaker Data API 

Yes 

Custom Web Publishing 

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" ; Create directories: Off]
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