Reference > Script steps reference > Control script steps > End If
 
End If
Purpose 
Marks the end of an If script step structure.
See also 
Format 
End If
Options 
None.
Compatibility 
 
Where the script step runs 
Supported 
FileMaker Pro 
Yes 
FileMaker Server 
Yes 
FileMaker Go 
Yes 
Custom Web Publishing 
Yes 
FileMaker WebDirect 
Yes 
Runtime solution 
Yes 
Originated in 
FileMaker Pro 6.0 or earlier
Description 
Every If script step must have a corresponding End If script step somewhere after it at the same indentation. Whenever you use an If script step, the script editing pane automatically enters an End If step.
Example 1 
Performs a find. If no records are found, displays all records and sorts.
Perform Find [Restore]
If [Get (FoundCount) = 0]
Show All Records
Sort Records [Restore; With dialog: Off]
End If
Related topics 
Script steps reference (alphabetical list)
Script steps reference (category list)