Else

Performs an alternate set of script steps when an If or Else If script step evaluates to false.

Options 

None.

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 

Else must follow an If script step or Else If script step. Else cannot follow another Else script step.

When all If script steps and Else If script steps evaluate to false, script execution moves to the Else script step. The script steps under Else are executed, and script execution moves to the End If script step.

Example 1 

Performs a find. If no records are found, displays a custom dialog box. If records are found, sorts the found set.

Copy
Perform Find [Restore]
If [Get ( FoundCount ) = 0]
    Show Custom Dialog ["Find Records"; "No records were found."]
Else
    Sort Records [Restore; With dialog: Off]
End If