Reference > Script steps reference > Control script steps > Else If
 

Else If

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

See also 

Options 

Specify the Boolean calculation you want evaluated.

Compatibility 

 

Product 

Supported 

FileMaker Pro Advanced 

Yes 

FileMaker Go 

Yes 

FileMaker WebDirect 

Yes 

FileMaker Server 

Yes 

FileMaker Cloud products 

Yes 

FileMaker Data API 

Yes 

Custom Web Publishing 

Yes 

Runtime solution 

Yes 

Originated in 

FileMaker Pro 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.

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

Related topics 

Defining calculation fields

If function

If structure examples

Script steps reference (alphabetical list)

Script steps reference (category list)

About formulas