Else If

Evaluates a Boolean calculation and performs a conditional action based on that evaluation, like If.

Options 

Specify the Boolean calculation you want evaluated.

Compatibility 

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

Originated in version 

6.0 or earlier

Description 

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

When an If script step evaluates to false, script execution moves to the Else If script step. When an Else If statement evaluates to true, the block of steps under the Else If is executed. An evaluation of true ends the Else If process, and upon reaching the next Else If or Else statement, execution will skip to the End If script step.

Example 1 

Performs a find and sorts records. If no records match the find request, displays a custom dialog box.

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