Startup script examples
A startup script can customize a user's view of a database or perform other actions when a database opens. Startup scripts are triggered by the OnFirstWindowOpen script trigger. For information on setting up a startup script, see Setting file options.
Example 1 
Goes to the Administration layout if the account is assigned the Full Access privilege set. Otherwise, goes to the Data Entry layout.
If [Get ( AccountPrivilegeSetName ) = "[Full Access]"]
Go to Layout ["Administration"]
Go to Layout ["Data Entry"]
End If
Example 2 
Checks which version of FileMaker Pro or FileMaker Go opened the database and goes to the appropriate Customers layout.
If [Get ( Device ) = 3]
Go to Layout ["Customers iPad"]
Else If [Get ( Device ) = 4]
Go to Layout ["Customers iPhone"]
Go to Layout ["Customers"]
End If