Script Steps Reference

Table Of Contents
Control script steps
F
ILEMAKER PRO SCRIPT STEPS REFERENCE 24
Example 2
Performs a find. If no records are found, displays a custom dialog box. If records are found, sorts the
found set.
Perform Find [Restore]
If [Get ( FoundCount ) = 0]
Show Custom Dialog ["Find Records"; "No records were found."]
Else
Sort Records [Restore; With dialog: Off]
End If
Example 3
Performs a find. If no records are found, displays a custom dialog box. If one record is found, goes
to the Invoice Details layout. If more than one record is found, goes to the Invoices layout.
Perform Find [Restore]
If [Get (FoundCount) = 0]
Show Custom Dialog ["Find Records"; "No record was found."]
Else If [Get (FoundCount) = 1]
Go to Layout ["Invoice Details"]
Else
Go to Layout ["Invoices"]
End If
Example 4
Performs a find. If no records are found, displays a custom dialog box so the user can run the Find
Invoices script to search again. If one record is found, goes to the Invoice Details layout. If more
than one record is found, goes to the Invoices layout.
Script: Find Invoices
Perform Find [ ]
If [Get ( FoundCount ) = 0]
Show Custom Dialog ["No Record Found"; "No records were found. Do
you want to search again?"]
If [Get ( LastMessageChoice ) = 1]
#Calls this script again as a sub-script
Perform Script ["Find Invoices"]
Else
Show All Records
End If
Else If [Get ( FoundCount ) = 1]
Go to Layout ["Invoice Details"]
Else
Go to Layout ["Invoices"]
End If
Sort Records [Restore; With dialog: Off]