Script Steps Reference

Table Of Contents
Miscellaneous script steps
F
ILEMAKER PRO SCRIPT STEPS REFERENCE 242
Example 1
Performs a find. If no records were found, displays a custom dialog box.
Perform Find [Restore]
If [Get (FoundCount) = 0]
Show Custom Dialog ["No records were found."]
End If
Example 2
Creates a new record, prompts the user to enter information, then goes to the Customer Details
layout. The first button is Cancel so that users don't inadvertently create a record by pressing Return
or Enter in the custom dialog box.
Freeze Window
New Record/Request
Show Custom Dialog ["New Customer"; "Enter information into the fields
below:"; Customers::Company; Customers::Name; Customers::City]
If [Get ( LastMessageChoice ) = 1]
Delete Record/Request [With dialog: Off]
Else
Go to Layout ["Customer Details"]
End If
Example 3
Enters Find mode, prompts the user for find criteria, and performs the find. If the find returns no
records, asks if the user wants to find again, and either performs the script again or halts all scripts.
Script: Find
Enter Find Mode [Pause: Off]
Show Custom Dialog ["Find customers by ID, name, or city.";
Customers::ID; Customers::Name; Customers::City]
If [Get ( LastMessageChoice ) = 1]
Perform Find [ ]
If [Get ( FoundCount ) = 0]
Show Custom Dialog ["No records were found. Find again?"]
If [Get ( LastMessageChoice ) = 1]
#Calls this script as a sub-script
Perform Script ["Find"]
Else
Show All Records
#Halts all scripts and sub-scripts
Halt Script
End If
End If
Else If [Get ( LastMessageChoice ) = 2]
Enter Browse Mode [Pause: Off]
End If