Forces all scripts, sub-scripts, or external scripts running in the current FileMaker application to stop immediately.
None.
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 |
FileMaker Pro 6.0 or earlier
Halt Script can leave your database in an unpredictable state. For example, the script might halt in an unanticipated layout, view, or mode.
Performs a find and prints. If no records are found, displays all records and halts the script.
Perform Find [Restore]
If [Get ( FoundCount ) = 0]
Show All Records
Halt Script
End If
Print [With dialog: Off]
The Print Unpaid Invoices script calls the Print sub-script. If the user chooses not to print invoices, the script and sub-script stop. If the user chooses to print invoices, unpaid invoices that match the Find criteria are printed. After printing, all records are displayed and sorted.
New Window [Style: Document; Name: "Invoice List"; Using layout: "Print Invoices" (Invoices)]
Perform Find [Restore]
#Calls the "Print" sub-script defined below
Perform Script [Specified: From list ; "Print" ; Parameter: ]
#Continues after the sub-script is completed if the user chose to print the invoices
Show All Records
Sort Records [Restore; With dialog: Off]
Show Custom Dialog ["Print Unpaid Invoices"; "Do you want to print unpaid invoices?"]
If [Get ( LastMessageChoice ) = 1]
Print [With dialog: Off]
Else
Close Window [Current Window]
#Halts both the sub-script and the main script
Halt Script
End If