Reference > Script steps reference > Control script steps > Else
 

Else

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

See also 

Options 

None.

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 

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.

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

Related topics 

Else If

If structure examples

Script steps reference (alphabetical list)

Script steps reference (category list)