Script Steps Reference

Table Of Contents
Control script steps
F
ILEMAKER SCRIPT STEPS REFERENCE 22
Example 2
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.
Main script: Print Unpaid Invoices
New Window [Name: "Invoice List"; Style: Document]
Go to Layout ["Print Invoices"]
Perform Find [Restore]
#Calls the "Print" sub-script defined below
Perform Script ["Print"]
#Continues after the sub-script is completed if the user chose to print
the invoices
Show All Records
Sort Records [Restore; No dialog]
Sub-script: Print
Show Custom Dialog ["Print Unpaid Invoices"; "Do you want to print
unpaid invoices?"]
If [Get ( LastMessageChoice ) = 1]
Print [No dialog]
Else
Close Window [Current Window]
#Halts both the sub-script and the main script
Halt Script
End If